sp.vcov                 package:mgcv                 R Documentation

_E_x_t_r_a_c_t _s_m_o_o_t_h_i_n_g _p_a_r_a_m_e_t_e_r _e_s_t_i_m_a_t_o_r _c_o_v_a_r_i_a_n_c_e _m_a_t_r_i_x _f_r_o_m (_R_E)_M_L _G_A_M _f_i_t

_D_e_s_c_r_i_p_t_i_o_n:

     Extracts the estimated covariance matrix for the log smoothing
     parameter estimates from a (RE)ML estimated 'gam' object, provided
     the fit was with a method  that evaluated the required Hessian.

_U_s_a_g_e:

     sp.vcov(x)

_A_r_g_u_m_e_n_t_s:

       x: a fitted model object of class 'gam' as produced by 'gam()'.

_D_e_t_a_i_l_s:

     Just extracts the inverse of the hessian matrix of the negative
     (restricted) log likelihood w.r.t the log smoothing parameters, if
     this has been obtained as part of fitting.

_V_a_l_u_e:

     A matrix corresponding to the estimated covariance matrix of the
     log smoothing parameter estimators, if this can be extracted,
     otherwise 'NULL'. If the scale parameter has been (RE)ML estimated
     (i.e. if the method was  '"ML"' or '"REML"' and the scale
     parameter was unknown) then the  last row and column relate to the
     log scale parameter.

_A_u_t_h_o_r(_s):

     Simon N. Wood simon.wood@r-project.org

_R_e_f_e_r_e_n_c_e_s:

     Wood, S.N. (2006) On confidence intervals for generalized additive
     models based on penalized regression splines. Australian and New
     Zealand Journal of Statistics. 48(4): 445-464.

_S_e_e _A_l_s_o:

     'gam'

_E_x_a_m_p_l_e_s:

      
     n <- 100
     x <- runif(n);z <- runif(n)
     y <- sin(x*2*pi) + rnorm(n)*.2
     mod <- gam(y~s(x,bs="cc",k=10)+s(z),knots=list(x=seq(0,1,length=10)),
                method="REML")
     sp.vcov(mod)

