I want to obtain the estimate of the variance-covariance matrix of the response vector of a final linear mixed model, for a male adult (where Gender (G.F = 1). I am using the getVarCov () function. but how do i specify this in the "individual" part of the function please.
My code so far is this. G.f is the factored Gender,A is the age of adult less the mean age, W is the weight of adult less the mean weight and Adult.f is the factor variable that identify the adult in the study. The model is represented below.
Model1<-lme(C ~ A + W + G.f + A:W + A:G.f + W:G.f + A:W:G.f, random = ~ 1 | Adult.f, weights =
varIdent(form = ~ 1 | G.f), method = "REML", data=Veneer)
I'm not sure if this is the correct way to do this. G.f can either be 0 or 1 only
VarY_hat <- getVarCov(Model1, individual = c(G.f = 1), type = "marginal")[[1]]
VarY_hat