[R] My finding-resent

2011-12-14 Thread 孟欣
Sorry for some typo last mail. I corrected it,and resent.Sorry for it. Sir: I find out that for 2 level factor, if I set it to "factor", then I'll get error reply. For the instance last mail, if I use: result1<-glm(y ~ factor(gender),family = binomial);#gender has 2 levels logistic.display

Re: [R] My finding

2011-12-13 Thread Jorge I Velez
lm_mengxin, Yes, it happens because you are not following what Dr. Chongsuvivatwong suggested you in a previous email. Compare > yourdata$age1 <- factor(yourdata$gender) > result1<-glm(y ~ gender + CD4,family = binomial, data=yourdata) > logistic.display(result1) and > fit <-glm(y ~ as.factor(

[R] My finding

2011-12-13 Thread 孟欣
Sir: I find out that for 2 level factor, if I set it to "factor", then I'll get error reply. For the instance last mail, if I use: result1<-glm(y ~ gender,family = binomial);#gender has 2 levels logistic.display(result1) Error in coeff[, 1] : incorrect number of dimensions if I use: res