stsls                 package:spdep                 R Documentation

_G_e_n_e_r_a_l_i_z_e_d _s_p_a_t_i_a_l _t_w_o _s_t_a_g_e _l_e_a_s_t _s_q_u_a_r_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     The function fits a spatial lag model by two stage least squares,
     with the option of adjusting the results for heteroskedasticity.

_U_s_a_g_e:

     stsls(formula, data = list(), listw, zero.policy = FALSE,
      na.action = na.fail, robust = FALSE,legacy=FALSE)

_A_r_g_u_m_e_n_t_s:

 formula: a symbolic description of the model to be fit. The details 
          of model specification are given for 'lm()'

    data: an optional data frame containing the variables in the model.
           By default the variables are taken from the environment
          which the function  is called.

   listw: a 'listw' object created for example by 'nb2listw'

zero.policy: if TRUE assign zero to the lagged value of zones without 
          neighbours, if FALSE (default) assign NA - causing
          'lagsarlm()' to terminate with an error

na.action: a function (default 'na.fail'), can also be 'na.omit' or
          'na.exclude' with consequences for residuals and fitted
          values - in these cases the weights list will be subsetted to
          remove NAs in the data. It may be necessary to set
          zero.policy to TRUE because this subsetting may create
          no-neighbour observations. Note that only weights lists
          created without using the glist argument to 'nb2listw' may be
          subsetted.

  robust: default FALSE, if TRUE, apply a heteroskedasticity correction
          to the coefficients covariances

  legacy: the argument chooses between two implementations of the
          robustness correction: default FALSE - use the estimate of
          Omega only in the White consistent estimator of the
          variance-covariance matrix, if TRUE, use the original
          implementation which runs a GLS using the estimate of Omega,
          and yields different coefficient estimates as well

_D_e_t_a_i_l_s:

     The fitting implementation fits a spatial lag model:


                       y = rho W y + X beta + e


     by using spatially lagged X variables as instruments for the
     spatially lagged dependent variable.

_V_a_l_u_e:

     an object of class "stsls" containing: 

coefficients: coefficient estimates

     var: coefficient covariance matrix

     sse: sum of squared errors

residuals: model residuals

      df: degrees of freedom

_A_u_t_h_o_r(_s):

     Luc Anselin, Gianfranco Piras and Roger Bivand

_R_e_f_e_r_e_n_c_e_s:

     Kelejian, H.H. and I.R. Prucha (1998). A generalized spatial two
     stage least squares procedure for estimating a spatial
     autoregressive model with autoregressive disturbances. _Journal of
     Real Estate Finance and Economics_ 17, 99-121.

_S_e_e _A_l_s_o:

     'lagsarlm'

_E_x_a_m_p_l_e_s:

     data(oldcol)
     COL.lag.eig <- lagsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, nb2listw(COL.nb))
     summary(COL.lag.eig, correlation=TRUE)
     COL.lag.stsls <- stsls(CRIME ~ INC + HOVAL, data=COL.OLD, nb2listw(COL.nb))
     summary(COL.lag.stsls, correlation=TRUE)
     COL.lag.stslsR <- stsls(CRIME ~ INC + HOVAL, data=COL.OLD, nb2listw(COL.nb),
     robust=TRUE)
     summary(COL.lag.stslsR, correlation=TRUE)
     data(boston)
     gp2a <- stsls(log(CMEDV) ~ CRIM + ZN + INDUS + CHAS + I(NOX^2) + I(RM^2) +
       AGE + log(DIS) + log(RAD) + TAX + PTRATIO + B + log(LSTAT),
      data=boston.c, nb2listw(boston.soi))
     summary(gp2a)

