[R] conf. int. for lm() and Up-arrow
Bill Venables
William.Venables at cmis.CSIRO.AU
Tue Aug 15 09:56:58 CEST 2000
>
> Dear all,
>
> Is there any function for calculating confidence limits
> for coefficients in an lm() object? I know of the
> confint() function in the MASS library working very
> well on my binomial GLMs and I have tried it (using glm
> () , family=gaussian) but it gives NAs according to
> below. Does the confint() function not accept gaussian
> GLMs? Could there be convergence problems in the GLM?
> Note the very low R2-value. Could the Hauck & Donner
> phenomenon discussed in V & R (1999) occur in a
> gaussian GLM? I guess not and I have tried with
> different epsilon but it does not change anything.
The software was never tested for this case as it seemed a little
pointless since the exact calculations can be done so simply. (you
might like to do it as a homework exercise...) I'll look at putting
in a switch to handle the case for future releases.
I suspect it will not work too well, though, as the method uses spline
interpolation to the signed square-root of the profile function, which
in this case is exactly linear. I think cubic spline interpolation of
straight lines causes some numerical problems. This is just a quick
response and you might like to check it.
>
> I use R 1.1.0 on Windows 98.
> Sorry to bother you about this but earlier some R users
> had problem using the Up arrow key to get the earlier
> written text rows. I deleted those mails because I
> usually use Windows NT. Now however I’m away from my
> office using R on Windows 98 (something I didn\'t plan
> to do). Could someone who have had this problem please
> tell me how to do to be able to use the Up arrow key
> again.
>
> Thanks for all hints!
>
>
> Sincerely,
> Tord Snäll
>
>
>
> > glm.spe.var<- glm(OSPEABUN~ V1+V2+V3+V4+V5+V6+V7+V8,
> family=gaussian, data=R)
> > lm.spe.var<- lm(OSPEABUN~V1+V2+V3+V4+V5+V6+V7+V8,
> data=R)
> > summary(lm.spe.var)
>
>
> Residuals:
> Min 1Q Median 3Q Max
> -0.854243 -0.353655 -0.212623 -0.004446 2.729957
>
> Coefficients:
> Estimate Std. Error t value Pr(>|t|)
> (Intercept) 0.274985 0.028895 9.517 < 2e-16 ***
> V1 0.145041 0.041001 3.537 0.000445 ***
> V2 -0.002472 0.047220 -0.052 0.958276
> V3 -0.016563 0.046899 -0.353 0.724120
> V4 -0.065702 0.029530 -2.225 0.026573 *
> V5 0.023614 0.031004 0.762 0.446665
> V6 0.130698 0.031565 4.141 4.12e-05 ***
> V7 -0.009698 0.042213 -0.230 0.818398
> V8 -0.041318 0.031670 -1.305 0.192672
> ---
> Signif. codes: 0 `***\\\' 0.001 `**\\\' 0.01 `*\\\'
> 0.05
> `.\\\' 0.1 ` \\\' 1
>
> Residual standard error: 0.6257 on 460 degrees of
> freedom
> Multiple R-Squared: 0.07881, Adjusted R-squared:
> 0.06279
> F-statistic: 4.92 on 8 and 460 degrees of freedom,
> p-value: 7.505e-006
>
> > summary(glm.spe.var)
>
>
> Deviance Residuals:
> Min 1Q Median 3Q Max
> -0.854243 -0.353655 -0.212623 -0.004446 2.729957
>
> Coefficients:
> Estimate Std. Error t value Pr(>|t|)
> (Intercept) 0.274985 0.028895 9.517 < 2e-16 ***
> V1 0.145041 0.041001 3.537 0.000445 ***
> V2 -0.002472 0.047220 -0.052 0.958276
> V3 -0.016563 0.046899 -0.353 0.724120
> V4 -0.065702 0.029530 -2.225 0.026573 *
> V5 0.023614 0.031004 0.762 0.446665
> V6 0.130698 0.031565 4.141 4.12e-05 ***
> V7 -0.009698 0.042213 -0.230 0.818398
> V8 -0.041318 0.031670 -1.305 0.192672
> ---
> Signif. codes: 0 `***\\\' 0.001 `**\\\' 0.01 `*\\\'
> 0.05
> `.\\\' 0.1 ` \\\' 1
>
> (Dispersion parameter for gaussian family taken to be
> 0.3915403)
>
> Null deviance: 195.52 on 468 degrees of freedom
> Residual deviance: 180.11 on 460 degrees of freedom
> AIC: 902.11
>
> Number of Fisher Scoring iterations: 2
>
> > confint(glm.spe.var, level=0.95)
> Waiting for profiling to be done...
> 2.5 % 97.5 %
> (Intercept) NA NA
> V1 NA NA
> V2 NA NA
> V3 NA NA
> V4 NA NA
> V5 NA NA
> V6 NA NA
> V7 NA NA
> V8 NA NA
>
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
Bill Venables, Statistician, CMIS Environmetrics Project
CSIRO Marine Labs, PO Box 120, Cleveland, Qld, AUSTRALIA. 4163
Tel: +61 7 3826 7251 Email: Bill.Venables at cmis.csiro.au
Fax: +61 7 3826 7304 http://www.cmis.csiro.au/bill.venables/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list