[R] pseudo R-squared for model generated with spgm (splm)

Marion Jacquot
Wed, 31 Oct 2012 17:15:09 -0000

I am working with the splm package. I use the spgm function: general
estimation of a panel data model. Based on this approach, I know it is
possible to compute a R2, eg the ratio of variation explained by a given
model.

My model is :
bivmod<-spgm(logIKA~NBLITRE0+NBLITRE1,data=mydatap,listw=comsKnn.nbW,spatial.error=TRUE)


I know that we can calculate the R^2 as the variance of the fitted
values from the reduced form of the model (Yfitted) over the variance of
y (here logIKA).
Since I am using the option lag = FALSE; the fitted value for an error
model are Yfitted = X\beta.

If I well understood :

*1) We can get X* (NT * k matrix of observations on the non-stochastic
regressors. with N: spatial units , T: time unit et k : number of
non-stochastic regressors) with

**

>bivmod$model[,c(2,3)]  # in the matrix of the data used (bivmod$model),
the first column corresponds to the response variable and the subsequent
one to regressors).

NBLITRE0 NBLITRE1

ADAM-LES-PASSAVANT-2004 0 0

ADAM-LES-PASSAVANT-2005 0 0

ADAM-LES-PASSAVANT-2006 0 0

ADAM-LES-PASSAVANT-2007 0 0

ADAM-LES-PASSAVANT-2008 0 0

ADAM-LES-VERCEL-2004 0 0


*2) Beta* corresponds to coefficients associated to each regressor : we
can get them with

**

>bivmod$coefficients

NBLITRE0 NBLITRE1

-0.001131662 -0.001083650


But I do not know what means the " \ " in the formula. I suppose it is
different from "/" which means "divide by ".

Any hint appreciated.

Regards,

Marion

--
Marion Jacquot
Laboratoire de Chrono-environnement
UMR UFC/CNRS 6249 USC INRA
Université de Franche-Comté
Place Leclerc
F-25030 Besançon cedex
FRANCE
Tel. : +33 (0)381 665 829
Fax : +33 (0)381 665 797
http://chrono-environnement.univ-fcomte.fr/



	[[alternative HTML version deleted]]