a********a 发帖数: 346 | 1 Is there anyway if I only treat x and y as one varialbe to get overall mean
of x and y, but treat z seperately to get mean of z only?
Thanks |
|
s*********e 发帖数: 1051 | 2 data two;
set one;
array a{*} _numeric_;
do i = 1 to dim(a);
xyz = a{i};
output;
end;
run;
proc means data = two n nmiss mean;
var xyz;
run; |
|
s*********e 发帖数: 1051 | 3 second one just for fun.
data one;
input x y z;
retain xyz n;
xyz + sum(x, y, z);
n + n(x, y, z);
datalines;
1 2 2
2 4 1
. 3 3
3 . 1
;
run;
data two;
set one end = eof;
if eof then do;
mean = xyz / n;
output;
end;
keep mean;
run; |
|
x**7 发帖数: 341 | 4 不错
second one just for fun.
data one;
input x y z;
retain xyz n;
xyz + sum(x, y, z);
n + n(x, y, z);
datalines;
1 2 2
2 4 1
. 3 3
3 . 1
;
run;
data two;
set one end = eof;
if eof then do;
mean = xyz / n;
output;
end;
keep mean;
run; |
|
EA 发帖数: 3965 | 5 我又一组数据,里面有较多的变量,享用proc means把所有变量的最小值,平均值和最
大值输出到一个表里,可是如果我用output就只能把结果输出成很长的一行,我想要的
表格是这样的
变量名|最小值|最大值|平均值
变量1|-1| 10 | 3
变量2|-2| 12 | 4
如果不用proc means,有什么其它命令可以做到我想要的结果吗?
另外,我想查一些变量的freq,value是一样的,比如都是0和1。可是output不能把所
有变量的结果放到一个表里,只能方最后一个变量的。尤其他的方法可以把所有变量的
结果放到一个表里,做成下面这种格式吗?
变量名|count_0|count_01|
变量1|12| 10 |
变量2|2| 12 | |
|
s********r 发帖数: 729 | 6 楼上斑竹说的是正解。
但是还有懒方法,
反复用 proc means 把你要的 min max mean分别存到一个个数据文件中
然后用
data (new filename);
set 文件1; set 文件2;……
run; |
|
b******n 发帖数: 2 | 7 工作中遇到这个问题,x是正态分布,那么1/x是一种已知的分布形式吗?可以估算mean
和std(standard deviation)吗?如果有x,y是正态分布,那么(1/x+1/y)的mean和
std怎么算?
希望能给我指个方向。非常感谢。 |
|
j*****e 发帖数: 182 | 8 Agree with prison2006.
Normal distribution has density over zero. The mean and variance of 1/X do
not exist.
You may use a positive distribution(weibull, log-normal), or a distribution
with positive support(beta) to model X. Then, mean and variance of 1/X exist
. |
|
i********f 发帖数: 206 | 9 我有一些数据,例如
x y
[1,] 0.010313070 -0.02893566
[2,] 0.245346732 0.31654765
[3,] 0.549282428 -0.15341703
[4,] -0.208582213 0.29955670
我想把他们分成两组.
> cl <- kmeans(dist,2)
如果我想固定K-means的起始点,让他们分别是([1,] 0.010313070 -0.02893566)和([2
,] 0.245346732 0.31654765),应该怎么写k-means中那个centers的参数呢? 多谢 |
|
o****o 发帖数: 8077 | 10 use rbind to stack the two vectors:
#--------------------
> x = read.table("clipboard",sep=' ', as.is=T, header=F) #read in sample
data
> c1<-c(0.010313070, -0.02893566)
> c2<-c(0.245346732, 0.31654765)
> kmeans(x, centers=c(c1, c2))
K-means clustering with 2 clusters of sizes 3, 1
Cluster means:
V1 V2
1 0.01569253 0.1957229
2 0.54928243 -0.1534170
Clustering vector:
[1] 1 1 2 1
Within cluster sum of squares by cluster:
[1] 0.1789207 0.0000000
Available components:
[1] "clust |
|
F********E 发帖数: 1025 | 11 What does "bandwidth" mean in non-parameter fitting? Does a smaller "
bandwidth" imply a more "squeezed" shape as scale parameter mean in normal
distribution?
Any link to a easy-to-read tutorial link will also be appreciated! |
|
n*****1 发帖数: 172 | 12 请问如何create一个vector, 里面的element是对应group的mean? 另外, data 比较大,
不知道有什么比较efficient的方
法?
例如:
id X
1 1
1 2
1 3
2 7
2 8
2 9
2 10
2 11
变成:
id X Mean
1 1 2
1 2 2
1 3 2
2 7 9
2 8 9
2 9 9
2 10 9
2 11 9
谢谢! |
|
o******6 发帖数: 538 | 13 ☆─────────────────────────────────────☆
bigwing2 (titi) 于 (Thu May 15 23:29:00 2008) 提到:
4 treatment: 1(control),2,3,4
5 timepoint: baseline, Month 1,2,3,4(repeated measure)
Already substract baseline value from the value of Month 1,2,3,4.and can
find mean change from basline for control and each treatment at each follow-
up month.
Now, want to find the difference of mean change from baseline between
treatment and control at Month 1, 2,3,4 respectively
i.e. want to find:
what's the differe |
|
c**d 发帖数: 104 | 14 when you look for mean change over time, you first have to check interaction between month and treatment. if significant interaction,
treat month as a class variable (you can create a new time variable ) to find mean change over time.
Then you can get what you want by using lsmeans trt*monthclass/
By the way, model can be complicated to check linear and quadratic trend with random effects
follow- |
|
D*********2 发帖数: 535 | 15 can you try to use cauchy? I saw you mentioned the mean is close to zero. if
they are iid with mean zero, you can apply cauchy distribution. |
|
e****o 发帖数: 690 | 16 how to find 4 highest and mean, median, I don't know to get median by
industry as grouping except using proc means. Any good coding?? 3X for your
reply.
data temp;
do i=90 to 107;
xx=abs(i/i**2 -100*uniform(7));
industry = 10;output;
end;
do i=108 to 130;
xx=abs(i/i**2 -100*uniform(7));
industry = 20; output;
end;
run;
proc sort data=temp; by industry descending xx;
data t1;
set temp;
id + 1;
if first.industry then id =1;
run;
data t2 ;set t1 ;
if id<5;
run;
proc |
|
d*******1 发帖数: 293 | 17 对于heavy tailed distribution的数据,该如何计算mean 的CI呢?
知道用non-parametric one sample可以估算median的CI, 但是不知道有什么好的方法
可以估算mean的CI? |
|
h******e 发帖数: 1791 | 18 在out = a后加n = n mean = mean median = median mode = mode行不行? |
|
s*******2 发帖数: 791 | 19 proc means data=test noprint;
output out = summary(drop = _:)
mean(var1 var2) =
n(var1) =
median(var1 var3) =
mode(var1 var5) / autoname;
run; |
|
s*****e 发帖数: 157 | 20 请教一下,对于一个imputation 5次后的data set,有三个group,group mean可以用
SAS 中的proc means 求,confidence interval 应该如何用sas算呢?谢谢 |
|
s*r 发帖数: 2757 | 21 proc glm 里面的means 多半是把mean和0比吧 |
|
m***y 发帖数: 79 | 22 请教大家一下,咋晕了
给出两个变量(x,y)目的是要estimate R=u_y/u_x, R_hat=y_bar/x_bar
simulate S 组data set(x,y) from known distribution, 每组算出R_hat,
monte carlo mean 就是average of S 个R_hat.
要test 这个mean是不是true value。 我是用的t-test,直接t.test(R_hat,mu=R)
结果竟然是p-value非常小,reject Ho: average(R_hat)=R,
数据都是从已知的bivariate normal distribution来的,怎么会reject呢,
是不能用t-test? 还是什么原因
先谢 |
|
c**d 发帖数: 104 | 23 这样小的sample size<5 如何准确估计 mean。个人的意见是,任何方法去准确估计
mean 都是play game |
|
y*c 发帖数: 247 | 24 如果在mixed model 里adjusting for baseline factors的话,estimate treatment
group means can be done. But what if I have a time-varying covariate
adjusted in the model? What should I do (in proc mixed) to estimate the
treatment group mean? 非常感谢。 |
|
y*c 发帖数: 247 | 25 There is no interactions in the model. Like linear regression, you plug the
means for the baseline covariates in the model in order to estimate group
means for the main treatment effect. But I have a time-dependent covariate
now. what should I plug in the equation? The average of the time-dependent
variable (infection during follow-up) across all visits and all patients?
what would be more meaningful? Hope somebody can help me.
|
|
m******t 发帖数: 273 | 26 I need to estimate a truncated gamma distribution paramters (shape , scale).
But, I only know the data mean and std. dev. I do not know the dat set.
Given the mean and std. dev. of a data set from a trucnated gamma
distribution, how to find shape and scale of the distribution parameters ?
I know MLE may be sueful for solving this problem. But, they depend on
knowing the whole data set.
Any help would be appreciated. |
|
h***x 发帖数: 586 | 27 和科学计算不同,k-mean只是计算点到类别中心的距离,然后把点归类到最近的类,没
有cost function可优化,所以也就无所谓global or local minimum了。但是初始值的
选择又非常重要,这和优化又是类似的。
k-mean很依赖数据本身的结构分布,有的数据上结果会很好,有的会很差。在商业应用
上,能合理的解释很重要。很多时候宁愿选择一个看起来分得不是那么好,但比较好解
释具体应用的,而不选择一个从算法上看,分得很好,但很难解释的。 |
|
g*****t 发帖数: 53 | 28 在SAS里面, 请帮忙看看如何运用已知两组的N,MEAN,SD进行u检验吗?
数据如下所示。比如比较Env 和gp120之间的差异。
N Mean SD
Env 232918000 0.0076836 1.74E-05
gp120 232918000 9.71E-03 2.03E-05
用Proc Power试了,似乎都是固定的alpha值,而我需要求两组差异的p值。 |
|
d*******1 发帖数: 854 | 29 一个binomial distribution b(n,p), mean=np.
但是如果p也是一个random variable, 比如log(p/(1-p)) follow N(2,4),那么这个
mixture binomial 的mean是什么呢?
谢谢拉。 |
|
n**********0 发帖数: 66 | 30 不懂你的意思。如果mean差那么大,那你就不可能是random sample也不
representative了吧。如果你是有bias的选择,那怎么着都行了 |
|
t*****a 发帖数: 459 | 31 为什么用mean来评价?确定是normal distribution? |
|
s******y 发帖数: 17729 | 32 没有粗口和谩骂,mean也作为封人的标准吗?版务跑上来封和自己观点口味不一致的帖
子算不算是mean?如何界定,请站务明示 |
|
z*******n 发帖数: 1034 | 33 July 17, 2014 4:00 PM
Cimarron Buser, Apperian
Apple and IBM announced a global partnership for “enterprise mobility”
this week, but what does this truly mean for enterprises?
What can we expect to see in terms of real deliverables in the next 6-12
months? Let’s take a look at the four “core capabilities” the new
partnership will address.
A new class of more than 100 industry-specific enterprise solutions
IBM is putting a stake in the ground — promising to build 100 new apps,
including native ap... 阅读全帖 |
|
a****n 发帖数: 2090 | 34 今早在新闻里又听见那个被bully到自杀的irish女孩儿的事儿, 电影mean girls比起
现实生活中的mean girls的行径真是小巫见大巫了。 未雨绸缪,为了儿子不成为未来
bully的牺牲品, 俺打算送他去学跆拳道了。 |
|
z**i 发帖数: 394 | 35 在NPR里听到很多次:"what does it mean to be jewish"
我不由得想问what does it mean to be Chinese? |
|
z**i 发帖数: 394 | 36 在NPR里听到很多次:"what does it mean to be jewish"
我不由得想问what does it mean to be Chinese? |
|
|
s**********d 发帖数: 36899 | 38
因为那是德国代表团的国旗伞。
没看到有啥mean的,不过这个记者挺注意细节的。 |
|
C***J 发帖数: 7594 | 39 SAO PAULO (AP) -- Stocking shelves in a Chinese grocery store, Thiago warned
that he didn't want to be caught chatting during working hours. Within
seconds, however, the Brazilian unleashed a pent-up flood of complaints
about the owners, who lingered just beyond hearing distance.
"My bosses have never heard of a day off," said the 20-year-old, who would
only allow his first name to be used, for fear of losing his job. "Vacations
? Forget it. They pay well and they pay for extra hours, but they d... 阅读全帖 |
|
l*******n 发帖数: 1867 | 40 organic pork means pork from pigs that are not confined in a feeding pen. |
|
l*******n 发帖数: 1867 | 41 organic WSNv means WSNvs that are not plastic surgery beautified. |
|
W****W 发帖数: 508 | 42 delphi要搞ipo了,you know what it means. |
|
k****z 发帖数: 1863 | 43 有问题的人什么时候都会有,
杀人武器也总是存在
正常良好的社会也会发生这种事,
但是发生的太多,就是这个社会越来越mean了
比方说大家(尤其政客)各打算盘,相互指责,
各派为了自己的agenda,一方面推崇虚伪自由,但对暴力文化不管不问
对有问题的人,要么在虚伪自由口号下不予重视,或者在暴力文化下挖苦打击 |
|
c******a 发帖数: 4400 | 44 这个有可能
mean的萝莉白牛往往和人说话的时候心里就在打量这个人JJ size |
|
p*****c 发帖数: 20445 | 45 【 以下文字转载自 Faculty 讨论区 】
发信人: sunnyday (胖头鱼。按斤卖就赚了), 信区: Faculty
标 题: Re: what's the meaning?
发信站: BBS 未名空间站 (Wed May 15 14:51:44 2013, 美东)
骂脏话呢。
Chino 是西班牙语的 Chinese, fu 就是那个FxxK的缩写。
你应该把这个事情向学校投诉,得狠狠的给这个学生一个教训 |
|
c*****g 发帖数: 21627 | 46 外F为什么对国人这么mean?平时找国人修车,有好处从来不给国人这种小事也就算了
国人找工作,公司里面的外F使绊;
国人上学,学校里面的外F AP打低分;
政治立法上,赵小兰欺压国人
媒体上,外F的邓windi不遗余力丑化国人形象……
国人为什么这么艰难,却没有应得的回报?答案全在外F的倒贴嫖资上
所以,对于别族的外F,希望越多越好
对于本族的外F,则希望越少越好 |
|
s**********e 发帖数: 33562 | 47 是你很mean好不好?
宝宝版的版标本来就是几天一换的。偶尔换了个混血宝宝的版标你就感觉被歧视了?没
人歧视你,你自己歧视自己而已。 |
|
|
L***6 发帖数: 8307 | 49 基督教白人比较容易嫉妒,反犹主要是来源于嫉妒。在欧洲住过的人都知道,你是异族
在他地盘上比他好,你肯定被仇恨和排挤。犹太人被罗马人赶出家园,在欧洲当N等公
民多少个世纪,受到多少迫害,不让他们种田那只能做买卖,给人赶来赶去,有些人性
格不好当然是正常的。黑死病明明是缺德的蒙古人弄得生物武器,却怪到老犹身上,
Mainz一下烧死4万多犹太人。
前两年西方也动不动就把牛奶涨价,肉制品涨价,汽油涨价和一切负面的事情怪到老中
身上,西藏暴乱也怪到汉人身上,你说谁更mean更无耻?中国近代和当代这么多外患,
有哪些是老犹造成的?疆独藏独是老犹支持的?他们海外总部在慕尼黑,源头是英国人
和苏联人。TG很多高科技武器,比如预警机和J10,不都是老犹顶着MD压力转让的?
。。
。。 |
|
b**k 发帖数: 3472 | 50 你读屁挨着地的时候没听美国学生说过犹太教授很Mean?
。。
。。 |
|