bcov: Covariance matrix estimation

bcovR Documentation

Covariance matrix estimation

Description

Covariance matrix estimation for the fixed effects case using Bahadur's representation. In mixed model, we use the BLUPs (as if they were estimated as fixed effects) and the same formula is used.

Usage

bcov(qremFit, linmod, dframe, qn, userwgts = NULL)

Arguments

qremFit

A fitted model object, returned by QREM.

linmod

A formula (the linear model for fitting in the M step).

dframe

A data frame containing the columns in the formula.

qn

The selected quantile. Must be in (0,1).

userwgts

The user-provided sampling weights (optional. Default=NULL.)

Value

A covariance matrix for the fixed-effects model.

Examples

data(simdf)
qremFit <-  QREM(lm,linmod=y~x*x2 +x3, df=simdf, qn=0.2)
covmat <- bcov(qremFit,linmod=y~x*x2 +x3, df=simdf, qn=0.2)

haimbar/QREM documentation built on Aug. 27, 2022, 7:10 p.m.