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:

     vcov.gam(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

_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))

