# NOT RUN {
# Example (following of example in CompoundFit)
# Estimated mixture probabilities:
(pl.hat <- estim[[1]])
# scores per unit
U <- scoreU.cgb2(fac, pl.hat)
# Conditional variances given a,b,p,q:
# 1. Variance of sum of scores:
(Vsc <- t(U) <!-- %*% U) -->
(Vsc <- varscore.cgb2(U))
# 2. sandwich variance-covariance matrix estimate of (v_1,v_2):
(hess <- hess.cgb2(U,pl.hat))
(Parameters <- vepar.cgb2(estim, Vsc, hess))
# 3. Theoretical indicators (with mixture prob pl)
decomp <- "r"
(theoretical <- main.cgb2( 0.6,a,b,p,q,pl0, pl,decomp=decomp))
# Estimated indicators and conditional variances : takes a long time!
(Indic <- veind.cgb2(Parameters,a,b,p,q, pl0, pl.hat, decomp="r") )
# }
Run the code above in your browser using DataLab