vcov: Variance-Covariance Matrix of smam Estimators

vcovR Documentation

Variance-Covariance Matrix of smam Estimators

Description

This function calculates variance covariance matrix for estimators from smam package. Different methods will be used for different 'smam' models.

Usage

## S3 method for class 'smam_mrme'
vcov(
  object,
  nBS = 25,
  detailBS = TRUE,
  numThreads = 5,
  gradMethod = "simple",
  vcovMethod = "pBootstrap",
  integrControl = integr.control(),
  ...
)

## S3 method for class 'smam_mm'
vcov(
  object,
  nBS = 25,
  detailBS = TRUE,
  numThreads = 5,
  integrControl = integr.control(),
  ...
)

## S3 method for class 'smam_mrh'
vcov(object, numThreads = 5, integrControl = integr.control(), ...)

## S3 method for class 'smam_mr'
vcov(object, ...)

## S3 method for class 'smam_bmme'
vcov(object, ...)

Arguments

object

a fitted object from one of 'smam::fitXXXX' functions

nBS

number of bootstrap.

detailBS

whether or not output estimation results of bootstrap, which can be used to generate bootstrap CI. Required when ‘vcovMethod==’pBootstrap''.

numThreads

the number of threads for parallel computation. If its value is greater than 1, then parallel computation will be processed. Otherwise, serial computation will be processed.

gradMethod

method used for numeric gradient (numDeriv::grad). Required when ‘vcovMethod==’Godambe''.

vcovMethod

method of calculating variance covariance matrix. This should be one of 'pBootstrap' (default) and 'Godambe'.

integrControl

a list of control parameters for the integrate function: rel.tol, abs.tol, subdivision.

...

Optional arguments that are not used

Examples

## time consuming example
#tgrid <- seq(0, 100, length=100)
#set.seed(123)
#dat <- rMRME(tgrid, 1, 0.5, 1, 0.01, "m")

## fit whole dataset to the MRME model
#fit <- fitMRME(dat, start=c(1, 0.5, 1, 0.01))
#fit

## get covariance matrix of estimators
#vcov(fit)


smam documentation built on Aug. 21, 2023, 9:09 a.m.

Related to vcov in smam...