[R-sig-Geo] spautolm - standard errors of regression paramters
Roger Bivand
Roger.Bivand at nhh.no
Mon Nov 5 20:18:24 CET 2007
On Mon, 5 Nov 2007, Sam Field wrote:
> List,
>
> I would like to grab the standard errors of the regression parameters from an
> spautolm object. Currently I am using...
>
> mod1 <- spautolm(y~var1 + var2,....)
>
> mod1_sd <- (diag(mod1$fit[["imat"]])^2
As with most model fitting functions, you use the summary method, so
summary(mod1)$Coef
is a four-column matrix, and
summary(mod1)$Coef[,2]
is the column you want.
Roger
PS. Reading summary.spautolm shows that the diagonal values of the matrix
you refer to are the squares of the SE values.
>
>
> This does produce a vector of the diagonal elements of a matrix that look like a
> variance covariance matrix (correct dimensions and row and column labels), but
> the values I get do not agree with what the summary() function displays -- they
> also seem implausibly small.
>
> any hints?
>
> Thanks!
>
> Sam
>
>
>
>
>
>
>
>
>
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list