[R] p value for coefficients in multinomial model
Xingwang Ye
xwye at sibs.ac.cn
Thu Apr 5 15:00:58 CEST 2007
Dear all,
1)how can I easily get p value for the coefficients of factors in a multinomial model?
2)why the p values for "type III" test with Anova are not identical to that from SAS?
for example:
A,B and C are categorical variables,but the proportions of each level in each categorical variables are not balance. Y is a nominal variables(>=3 categories);
To do multinomial logistic regression in SAS, I tried
proc logistic data=a;
class A B C Y/param = ref ref = first;
model Y=A B C/link=logit;
run;
In R, I tried this:
library(car)
library(nnet)
b <- as.data.frame(lapply(a[,c("A","B","C","Y")], as.factor))
mod.mul<- (Y~A+B+C,data=b)
summary(mod.mul,cor=F,Wald=T)
Anova(mod.mul,type="III")
I can get the identical coefficients and std.errors in R as in SAS. how can I easily get the p value for each coeefficients? However,the "LR Chisq" for each variables are similar but not identical to that from SAS, why?
BTW,please forward your kind answers to my email. Thank you.
Best wishes
yours, sincerely
Xingwang Ye
PhD candidate
Research Group of Nutrition Related Cancers and Other Chronic Diseases
Institute for Nutritional Sciences,
Shanghai Institutes of Biological Sciences,
Chinese Academy of Sciences
P.O.Box 32
294 Taiyuan Road
Shanghai 200031
P.R.CHINA
More information about the R-help
mailing list