# NOT RUN {
# Example (following of example in CompoundAuxFit)
# Scores U
U <- scoreU.cavgb2(facgl, z, lambdafitl)
# Scores multiplied by z
SC <- scorez.cavgb2(U,z)
# Naive variance estimate of sum of scores
(Vsc <- varscore.cavgb2(SC,w=pwa))
# Design based variance of sum of scores
(desv <- desvar.cavgb2(data=ns,SC=SC,id=~hid,strata=~region,weights=~pwa))
# Hessian
hess <- hess.cavgb2(U,pglfitl,z,w=pwa)
# 1. Sandwich variance-covariance matrix estimate of parameters using Vsc:
Param1 <- vepar.cavgb2(fitcml,Vsc, hess)
Param1
# 2. Sandwich variance-covariance matrix estimate of parameters using
# the design variance:
Param2 <- vepar.cavgb2(fitcml,desv$Vtheta, hess)
Param2
# 3. Indicators and conditional variances : takes a long time!
(Indic <- veind.cavgb2(group,Param2 ,agl.fit,bgl.fit,pgl.fit,qgl.fit,
pl0, pglfitl, decomp="l") )
# }
Run the code above in your browser using DataLab