[R] predicted probabilities after lmer

2008-12-02 Thread arpino
Dear R-users, I'm using lmer to fit two-level logistic models and I'm interested in predicted probabilities that I get in this way (using "fitted"): glm1 = lmer(XY$T1~X1 + X2 + X3 + (1|Cind), family=binomial) #estimation of a two-level logit model fit1=fitted(glm1) # I get the fitted line

[R] How to predict probabilities after using lmer

2008-11-25 Thread arpino
Dear R-users, I'm using lmer to fit two-level logistic models and I'm interested in predicted probabilities that I get in this way (using "fitted"): glm1 = lmer(XY$T1~X1 + X2 + X3 + (1|Cind), family=binomial) #estimation of a two-level logit model fit1=fitted(glm1) # I get the fitted line

[R] Loop for in R to generate several variables

2008-04-07 Thread arpino
Hi everybody, I have to create several variables of this form: Yind = L0 + L1*X1 + L2*X2 + L3*X3 + K*Cind + n where ind varires in {1,...,10} I thought to this loop for but it does not work: for (ind in 1:10) { Yind = L0 + L1*X1 + L2*X2 + L3*X3 + K*Cind + n } Any suggestions? Tha