Hi Folks, I'm seeking confirmation of something which is probably true but which I have not managed to find in the documentation. I have a binary response y={0.1} and a variable x and have fitted a probit response to the data with f <- glm( y~x, family=binomial(link=probit) ) and then, with a specified set of x-value X I have used the predict.glm function as p <- predict( f, X, type="response", se.fit=TRUE ) obtaining, as described in ?predict.glm, a list p with components p$fit the fitted values (of P[y=1]) at the value of X p$se.fit The documentation does not say definitely what p$se.fit is, only calling it "Estimated standard errors". I *believe* this means, at each value of X, the SE in the estimation of P[y=1] taking account of the joint uncertainty in the estimation of 'a' and 'b' in the relation probit(P) = a + b*X Can someone confirm that this really is so? With thanks, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 167 1972 Date: 27-Apr-04 Time: 21:08:07 ------------------------------ XFMail ------------------------------
(Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> writes:> The documentation does not say definitely what p$se.fit is, > only calling it "Estimated standard errors". I *believe* > this means, at each value of X, the SE in the estimation > of P[y=1] taking account of the joint uncertainty in the > estimation of 'a' and 'b' in the relation > > probit(P) = a + b*X > > Can someone confirm that this really is so?Pretty accurate, I'd say. Basically, the fitted value is a function of the estimated parameters. Asymptotically, the latter are approximately normally distributed with a small dispersion so that the function is effectively linear and you can approximate the distribution of the fitted value with a normal distribution. Just be aware that the fitted values can be on different scales (P vs. logit(P)) and that the se.fit similarly. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
At 05:24 2004-04-28, Liliana Forzani wrote:>I have a code in sas (NLMIXED) and I have a hard time converting to r >1)it is poisson, with random intercept, but >it have an offset. Means, I do not want one of the coefficient to be >estimate. Means, may model is >g(mean) = beta X + Z, >Z fixed, X fixed and beta to be estimate >I am using glmmML.If I recall correctly, neither glmmML nor glmmPQL (from MASS) handles offset terms. But GLMM in the lme4 package does.>2) the same but I have random slope (and I think with glmmML I can use >only random intercept)GLMM in lme4 can do this.>3) I try to use nlme, is this "equivalent" to NLMIXED?No, nlme fits non-linear and linear mixed-effect models with Gaussian error terms. I hope this helps, Henric
On Wed, Apr 28, 2004 at 11:13:30AM +0200, Henric Nilsson wrote:> At 05:24 2004-04-28, Liliana Forzani wrote: > > >I have a code in sas (NLMIXED) and I have a hard time converting to r > >1)it is poisson, with random intercept, but > >it have an offset. Means, I do not want one of the coefficient to be > >estimate. Means, may model is > >g(mean) = beta X + Z, > >Z fixed, X fixed and beta to be estimate > >I am using glmmML. > > If I recall correctly, neither glmmML nor glmmPQL (from MASS) handles > offset terms. But GLMM in the lme4 package does.glmmML handles offset terms. I am pretty sure that glmmPQL does too.> > >2) the same but I have random slope (and I think with glmmML I can use > >only random intercept) > > GLMM in lme4 can do this. > > >3) I try to use nlme, is this "equivalent" to NLMIXED? > > No, nlme fits non-linear and linear mixed-effect models with Gaussian error > terms. > > I hope this helps, > Henric > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html-- G??ran Brostr??m tel: +46 90 786 5223 Department of Statistics fax: +46 90 786 6614 Ume?? University http://www.stat.umu.se/egna/gb/ SE-90187 Ume??, Sweden e-mail: gb at stat.umu.se