drewlee not exactly. You've lost the comparison of intercepts. I think LRT under the assumption of linearity would be a not bad means.
zcfang 谢谢几位大侠,最近忙别的考试没有来看,不好意思。但是这个问题不是比较交互作用的。 实验是神经电生理方面的,直线斜率代表电导,截距代表翻转电位; 比较实验组和对照组这两个参数的差异就是想看看处理是不是有效。 不知我的叙述是否清楚了?
drewlee LRT。 设模型是Y*=X*b1+e; Y=Xb2+e 两个样本是(Y*,X*),(Y,X)。噪音iid~N(0,sigma)。令Y**=rbind(Y*,Y), X**=rbind(X*,X)。 H0:b1=b2 H1:otherwise 大样本下,下面的统计量 ~chi-square(df), df=p。在你的例子里,p=2。 注P=X(X^TX)^(-1)X^TY
neige [quote]引用第4楼zcfang于2007-05-22 16:11发表的“”: 谢谢几位大侠,最近忙别的考试没有来看,不好意思。但是这个问题不是比较交互作用的。 实验是神经电生理方面的,直线斜率代表电导,截距代表翻转电位; 比较实验组和对照组这两个参数的差异就是想看看处理是不是有效。 不知我的叙述是否清楚了?[/quote] I am not sure if you understand me, test for interaction is basically test if the two lines are parallel i.e. same slope or not
drewlee [quote]引用第6楼neige于2007-05-23 08:17发表的“”: I am not sure if you understand me, test for interaction is basically test if the two lines are parallel i.e. same slope or not[/quote] 他的意思不只是检验斜率,而是截距斜率一起检验。这个问题很基本吗?好像不那么常规吧。 另外,我的经验中,interaction不是指斜率,而是交互作用,比如多项式回归里面的交叉项。
drewlee 以前看Taguchi 的实验设计的时候,记得交互作用是指类似下面的模型 y=a0+a1*x1+a2*x2+a12*x1*x2+...+e a12这个系数才是交互作用项的系数。 也许你在其他书上看到过其他的定义。
neige i see what you mean, when your x1 is catergerical , if a12 is 0, then the levels of x1 will have same slope. let’s say we want to see if Age (X) is useful in predicting outcome (Y) among male and female populations: Male : Ym = α0 +α1X (1) Female : Yf = β0 +β1X (2) i.e. α1 = β1, they have the same slope or not, this is what LZ wants. We can test this by introducing another variable to join the two models. Consider G = 0 for female and G = 1 for male, one can manipulate the formulas to get: Y =β0 + (α0-β0) G + α1X + (α1-β1) G*X = γ0 +α1X + γ1 G*X (3) you can substitute G=1 into (3) to get (1) and G=0 to get (2). So (3) is equivalent as (1) and (2). Here γ1 = α1-β1, you are then testing if γ1 is 0 or not, i.e. the interaction effect
drewlee [quote]引用第10楼neige于2007-05-24 23:50发表的“”: i see what you mean, when your x1 is catergerical , if a12 is 0, then the levels of x1 will have same slope. let’s say we want to see if Age (X) is useful in predicting outcome (Y) among male and female populations: Male : Ym = α0 +α1X (1) .......[/quote] There might be something wrong with your derivation. I apologize if I make a mistake. (3) should be modified as follow Y =β0 + (α0-β0) G + β1X + (α1-β1) G*X = γ0 +α1X + γ1 G*X (3) Still, I don't exactly know about the last equation, which is Y=γ0 +α1X + γ1 G*X by checking it like the this way: Y=γ0 +α1X + γ1 X , for G=1 Y=γ0 +α1X , for G=0 They don't equal to (1)(2) respectively. However, the last equation in (3) doesn't influent your conclusion that conducting hypothesis test that (α1-β1), the coefficient of interaction term, is zero is equavalent to test whether two slopes are equal. But, what LZ wants is not just to test whether two slopes are equal, but to test both that and that two intercepts are equal simultaneiously. To solve LZ's problem, we have to do a multi-hypothesis test if we use your model. Some p-value adjustment methods have to involve in.
neige Sorry, I had a typo there, you are right, when you sub G into (3) G = 1 : Y = β0 + (α0-β0)* 1 + β1X + (α1-β1) *1*X = β0 + α0-β0 + β1X + α1X-β1X = α0 +α1X (1) G = 0 : Y = β0 + (α0-β0)* 0 + β1X + (α1-β1) *0*X = β0 +β1X (2) I hate typing this, latex is easier, anyways.
drewlee [quote]引用第12楼neige于2007-05-25 11:45发表的“”: Sorry, I had a typo there, you are right, when you sub G into (3) G = 1 : Y = β0 + (α0-β0)* 1 + β1X + (α1-β1) *1*X = β0 + α0-β0 + β1X + α1X-β1X = α0 +α1X (1) .......[/quote] Try this: http://maths.utime.cn:81/textool/tex.htm
summerday 在SAS程序里用两个proc glm过程 proc glm; class c; model y=x c x*c; run; proc glm; class c; model y=x c; run; 其中,才为分组变量,先检验其交互作用,若为零,则平行,然后就检查分组变量c的方差分析结果,即截距