Learn R Programming

gamlss (version 4.2-8)

rvcov: Robust Variance-Covariance matrix of the parameters from a fitted GAMLSS model

Description

The function rvcov() is design for providing robust standard errors for the parameters estimates of a GAMLSS fitted model. The same result can be achieved by using vcov(fitted_model,robust=TRUE). The function get.() gets the $K$ matrix (see details below).

Usage

rvcov(object, type = c("vcov", "cor", "se", "coef", "all"))
get.K(object, what = c("K", "Deriv"))

Arguments

object
a GAMLSS fitted object
type
this argument for rvcov() function whether variance-covariance matrix, correlation matrix, standard errors or all of them
what
this an argument for the function ket.K() allowing to get either $K$ or the first derivative of the likelihood with respect to the parameters (the $\beta$'s in the GAMLSS notation).

Value

  • A variance covariance matrix or other relevant output

Details

The robust standard errors are calculated for the robust sandwich estimator of the variance-covariance given by $S=VKV$ where $V$ is the standard variance-covariance matrix (the inverse of the information matrix) and $K$ is an estimate of the variance of he first derivatives of he likelihood. The function get.K() is use the get the required $K$ matrix.

References

Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.

Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R. Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.org/).

Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, http://www.jstatsoft.org/v23/i07.

See Also

vcov, ~~~

Examples

Run this code
# gererate from a gamma distribution 
Y <- rGA(200, mu=1, sigma=2)
hist(Y)
# fitting the wrong model i.e. sigma=1 
m1 <- gamlss(Y~1, family=EXP) 
# the conventinal se is too precise 
vcov(m1, type="se")
# the sandwich se is wider  
rvcov(m1, type="se") 
# fitting the correct model 
 m2 <- gamlss(Y~1, family=GA)
 vcov(m2, type="se")
 rvcov(m2, type="se")
# similar stadard errors
# also obtained using 
vcov(m2, type="se", robust=TRUE)

Run the code above in your browser using DataLab