jimi9876
我有如下数据,应变量response非正态,如何比较处理treat间的差异,分析时要消除covariate的影响,最后做treat的成对比较
谢谢!
treat covariate response
a 24.7 0
a 26 215
a 26 63
a 23.8 192
a 25.2 228
a 28.6 78
a 28.6 254
b 22.8 92
b 27 276
b 25.8 263
b 26.4 253
b 28.4 269
b 23.7 244
b 28.3 289
b 26.5 248
c 25.1 262
c 24.4 36
c 24.6 256
c 28.7 295
c 26.8 238
c 27 247
c 23.5 216
王笑权
好难啊!即使是刘勤,金丕奂的《分类数据的统计分析和SAS编程〉P87的ancova例子也没讲道如何按上述要求作成对分析呀
搓一下吧!
data cos;
input g $ c r;
cards;
a 24.7 0
a 26 215
a 26 63
a 23.8 192
a 25.2 228
a 28.6 78
a 28.6 254
b 22.8 92
b 27 276
b 25.8 263
b 26.4 253
b 28.4 269
b 23.7 244
b 28.3 289
b 26.5 248
c 25.1 262
c 24.4 36
c 24.6 256
c 28.7 295
c 26.8 238
c 27 247
c 23.5 216
;
proc rank out=ranks;
var c r;
proc reg noprint;
model r=c;
output out=a r=resid;
proc freq;
tables g*resid/cmh2;
data aa;set a;
re=abs(resid);
proc univariate normal data=aa;
class g;
var re;
proc glm;
class g;
model r=g/ss3;
means g/hovtest=levene t bon snk;
proc print;
run;
rtist
The difficult part of this problem is NOT multiple testing, but modeling the variance as a function of the mean (and probably the distributional form also, with less importance).
jimi9876
[quote]引用第1楼王笑权于2007-12-19 17:19发表的“”:
好难啊!即使是刘勤,金丕奂的《分类数据的统计分析和SAS编程〉P87的ancova例子也没讲道如何按上述要求作成对分析呀
搓一下吧!
data cos;
input g $ c r;
cards;
.......[/quote]
真的是太感谢了!但能否简单解释一下程序,还有英文中这叫什么方法,谢谢!
highyuan
我也是同样的问题
neige
assumption is the residuals are normally distributed, not your response, it is just a consequence
rtist
Oops, I missed an important word - NOT - when I replied. That's bad Just corrected.
neige: The assumptions are made on errors, not residuals. But we examine errors through residuals.
For this data, normality is questionable. But, as I replied earlier, I tend to treat it as a problem of non-constant variance. The variance is larger when the mean is smaller. Usually, several assumptions may fail simultaneously, as in this data. When non-constant variance is properly modeled, the normality assumption is not an important one, partly due to CLT.
The pairwise comparison is a rather unimportant issue here.
rtist
I suggest to plot the data before any models, like 笑权's, are fitted. The problem is easy to see.
In R, at least a conditional scatter plot is needed:
library(lattice)
xyplot(response~covariate|treat,data=your.data.frame.here)
jimi9876
[quote]引用第7楼rtist于2007-12-20 14:03发表的“”:
I suggest to plot the data before any models, like 笑权's, are fitted. The problem is easy to see.
In R, at least a conditional scatter plot is needed:
library(lattice)
xyplot(response~covariate|treat,data=your.data.frame.here)[/quote]
请问data plot 后大概怎么看呢,请原谅本人对统计学一知半解,多谢各位高人隐士热心资助,
谢谢
!!!!
rtist
you can check the (a rather incomplete list):
mean function: is it linear to the covariate? if not, what kind of relationship? is the relationship the same across the treatment? etc.
variance function: is it constant across the treatment? is it constant over the range of the mean function? if not, what kind of relationship? is it constant over the covariate? if not, what kind of relationship? etc.
distribution: (again, not very important if you can fix the previous two problems) what's the support? what you are measuring? is it continuous or discrete or else? is it symmetric? is its mean-variance relationship consistent with what you proposed above? etc.
covariate: is it known or conditioned upon? if not, what kind of error structure is associated with it? etc.
a serious data analysis is never just finding a software. good luck.
jimi9876
[quote]引用第9楼rtist于2007-12-21 07:25发表的“”:
you can check the (a rather incomplete list):
mean function: is it linear to the covariate? if not, what kind of relationship? is the relationship the same across the treatment? etc.
variance function: is it constant across the treatment? is it constant over the range of the mean function? if not, what kind of relationship? is it constant over the covariate? if not, what kind of relationship? etc.
.......[/quote]
so much thank you!