RE: [S] How can I get standard errors with predict?

George W. Gilchrist (gilchgw@u.washington.edu)
Tue, 21 Apr 1998 14:21:14 -0700


Thanks to all who replied to my plea for help. It turns out that Chuck
Taylor from StatSci provided the clue I needed to solve the problem. For
some reason, a library of my customized functions at position 2 on the
search list was interfering with predict.gam. Detaching the library or
moving it to the end of the search path solved the problem.

Cheers, George
=======================================================
George W. Gilchrist gilchgw@u.washington.edu
University of Washington Phone:(206)543-4859
Dept. of Zoology, Box 351800 FAX:(206)543-3041
Seattle, WA 98l95-1800

> -----Original Message-----
> From: Chuck Taylor [mailto:chuck@statsci.com]
> Sent: Tuesday, April 21, 1998 10:43 AM
> To: George W. Gilchrist
> Subject: Re: [S] How can I get standard errors with predict?
>
>
> George,
>
> I tried this with S-PLUS 3.4 and S-PLUS 4.0R3 and can't reproduce the
> error you report. What version are you using? Do you have something
> masked? Do you have a library or module attached?
>
> |-----------------------------------|
> | Chuck Taylor |
> | Senior Quality Assurance Engineer |
> | MathSoft Seattle, WA, USA |
> |-----------------------------------|
>
>
> On Tue, 21 Apr 1998, George W. Gilchrist wrote:
>
> > I've been scratching my head over this one for several days now and an
> > earlier posting yielded not one comment. Can anyone tell me why the
> > following code generates an error message when I call predict with the
> > se.fit=T option? All this talk about how useful standard errors
> would be for
> > other methods of predict makes me think how useful they would be for the
> > methods that allegedly can produce SE's! What is this
> "return.cov" that the
> > function cannot find? Obviously I must not be doing something
> that needs to
> > be done here. Anyone have a clue as to what it is?
> >
> > > tmp1<-rep(1:20, times=rep(3, 20))
> > > tmp2<-sort(rnorm(60))
> > > tmp3<-lm(tmp2~tmp1)
> > > summary(tmp3)
> >
> > Call: lm(formula = tmp2 ~ tmp1)
> > Residuals:
> > Min 1Q Median 3Q Max
> > -0.9712 -0.1927 0.0126 0.1366 0.9962
> >
> > Coefficients:
> > Value Std. Error t value Pr(>|t|)
> > (Intercept) -1.7200 0.0726 -23.6781 0.0000
> > tmp1 0.1680 0.0061 27.7064 0.0000
> >
> > Residual standard error: 0.2708 on 58 degrees of freedom
> > Multiple R-Squared: 0.9298
> > F-statistic: 767.6 on 1 and 58 degrees of freedom, the p-value is 0
> >
> > Correlation of Coefficients:
> > (Intercept)
> > tmp1 -0.8765
> > > tmp4<-predict(tmp3, se.fit=T)
> > Error in get.default("return.cov", frame = 1): Object
> "return.cov" not found
> > Dumped
> > > tmp4<-predict.lm(tmp3, se.fit=T)
> > Error in get.default("return.cov", frame = 1): Object
> "return.cov" not found
> > Dumped
> > > tmp4<-predict.glm(tmp3, se.fit=T)
> > Error in get.default("return.cov", frame = 1): Object
> "return.cov" not found
> > Dumped
> > > tmp4<-predict.gam(tmp3, type="response", se.fit=T)
> > Error in get.default("return.cov", frame = 1): Object
> "return.cov" not found
> > Dumped
> > =======================================================
> > George W. Gilchrist gilchgw@u.washington.edu
> > University of Washington Phone:(206)543-4859
> > Dept. of Zoology, Box 351800 FAX:(206)543-3041
> > Seattle, WA 98l95-1800
> >
>

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news