Re: [R] two-factor linear models with missing cells

2009-08-04 Thread Peter Dalgaard
Murray Jorgensen wrote: Hi Peter, there is no problem if the missing cell is not in the first row or column: the corresponding interaction parameter is omitted. In my case the data in the (1,4) cell is missing. What results is clear to me now: the (3,4) interaction parameter is dropped so

Re: [R] two-factor linear models with missing cells

2009-08-04 Thread Murray Jorgensen
Hi Peter, there is no problem if the missing cell is not in the first row or column: the corresponding interaction parameter is omitted. In my case the data in the (1,4) cell is missing. What results is clear to me now: the (3,4) interaction parameter is dropped so that (Intercept) + Biv now

[R] two-factor linear models with missing cells

2009-08-02 Thread Murray Jorgensen
I am wondering how to interpret the parameter estimates that lm() reports in this sort of situation: y = round(rnorm(n=24,mean=5,sd=2),2) A = gl(3,2,24,labels=c(one,two,three)) B = gl(4,6,24,labels=c(i,ii,iii,iv)) # Make both observations for A=1, B=4 missing y[19] = NA y[20] = NA

Re: [R] two-factor linear models with missing cells

2009-08-02 Thread David Winsemius
Does this help at all? after your code... contrasts(A) two three one 0 0 two 1 0 three 0 1 contrasts(B) ii iii iv i0 0 0 ii 1 0 0 iii 0 1 0 iv 0 0 1 contrasts(A:B) one:ii one:iii one:iv two:i two:ii two:iii two:iv three:i

[R] two-factor linear models with missing cells

2009-08-02 Thread Murray Jorgensen
I am wondering how to interpret the parameter estimates that lm() reports in this sort of situation: y = round(rnorm(n=24,mean=5,sd=2),2) A = gl(3,2,24,labels=c(one,two,three)) B = gl(4,6,24,labels=c(i,ii,iii,iv)) # Make both observations for A=1, B=4 missing y[19] = NA y[20] = NA

Re: [R] two-factor linear models with missing cells

2009-08-02 Thread Peter Dalgaard
Murray Jorgensen wrote: I am wondering how to interpret the parameter estimates that lm() reports in this sort of situation: y = round(rnorm(n=24,mean=5,sd=2),2) A = gl(3,2,24,labels=c(one,two,three)) B = gl(4,6,24,labels=c(i,ii,iii,iv)) # Make both observations for A=1, B=4 missing y[19] = NA