vcov.gam                package:mgcv                R Documentation

_E_x_t_r_a_c_t _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 _G_A_M _f_i_t

_D_e_s_c_r_i_p_t_i_o_n:

     Extracts the Bayesian posterior covariance matrix of the
     parameters or frequentist covariance matrix of the parameter
     estimators  from a fitted 'gam' object.

_U_s_a_g_e:

     ## S3 method for class 'gam':
     vcov(object, freq = TRUE, dispersion = NULL, ...)

_A_r_g_u_m_e_n_t_s:

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

    freq: 'TRUE' to return the frequentist covariance matrix of the
          parameter estimators, 'FALSE' to return the Bayesian
          posterior covariance matrix of the parameters.

dispersion: a value for the dispersion parameter: not normally used.

     ...: other arguments, currently ignored.

_D_e_t_a_i_l_s:

     Basically, just extracts 'object$Ve' or 'object$Vp' from a
     'gamObject'.

_V_a_l_u_e:

     A matrix corresponding to the estimated frequentist covariance
     matrix of the model parameter estimators/coefficients, or the
     estimated posterior covariance matrix of the parameters, depending
     on the argument 'freq'.

_A_u_t_h_o_r(_s):

     Henric Nilsson.  Maintained by 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)
     y <- sin(x*2*pi) + rnorm(n)*.2
     mod <- gam(y~s(x,bs="cc",k=10),knots=list(x=seq(0,1,length=10)))
     diag(vcov(mod))

