[R] Model parameterization / Factor Levels
Peyuco Porras Porras .
levin001 at 123mail.cl
Wed Oct 12 14:56:23 CEST 2005
Dear R users;
I'm looking for some hint about how to deal with the following situation:
Response = Y
Factor A = levels: 0, 1
Factor B = levels: 0, 1
Factor C = levels: 1,2,3,4
Model: Logistic 3-parms.
where th1~1+A+C, th2~1+C; th3~1
For 'simplicity' (for me) I'm using the SAS contrast parameterization.
The output looks like
Beta p-value
th1.(Intercept) 550 <0.000
th1.A1 -15 <0.000
th1.B1 5 <0.032
th1.C1 -12 <0.001
th1.C2 -5 0.022
th1.C3 -3 0.222
th2.(Intercept) ......
......etc
if we look at the results, we may conclude that level 3 for Factor C is not
statiscally significant. The question is: How can I remove this level of this factor
from the analysis? Let's say that the final results looks like
Model: Logistic 3-parms.
where th1~1+A+C, th2~1+C; th3~1, but C with levels 1,2 and 4 only
Beta p-value
th1.(Intercept) 560 <0.000
th1.A1 -15 <0.000
th1.B1 5 <0.032
th1.C1 -15 <0.001
th1.C2 -8 0.031
th2.(Intercept) ......
......etc
I tried replacing Factor C by 4 different columns, say FACTORC_1, FACTOR_C2,
FACTOR_C3, and FACTOR_C4 each one of them with 0 or 1, and the model I tried was
f1<-nlme(Y~SSlogis(X,th1,th2,th3)|Subject,fixed=list(th1~A+B+FACTORC_1+FACTOR_C2, etc
but, as I expected, the model can't be solved
I will appreciate any help
More information about the R-help
mailing list