jepusto / lmeInfo

Information matrices for fitted nlme::lme and nlme::gls models
https://jepusto.github.io/lmeInfo/
4 stars 2 forks source link

Applying the delta rule to estimate the sampling variance of the variance component parameters like `varcomp_vcov` in a simple case #54

Closed gavril0 closed 10 months ago

gavril0 commented 10 months ago

I have tried to compute the variance-covariance matrix of the sample parameters of the random effects for a model fitted with lme. In particular, I tried to use the delta rule to transform the terms in the diagonals of the matrix apVar which contain the sampling variance of the variance component parameters in the so-called natural parameterization (Pinheiro, p. 93) in a simple case (two correlated random effects). However, i get a a result that is different from the one obtained with lmeInfo::varcomp_vcov for the variance of the sample covariance. Unfortunately, this page does not show how to apply the delta rule for the variance of the sample covariance parameter.

I posted my question on stats.stackexchange with the code that I am using to reparameterize the matrix apVar. The code is quite simple but also currently limited to two correlated random effects. Because the results are very similar for the variance of the sample variance parameters, I think that I must have made an error somewhere when trying to use the delta method to compute the variance of the sample covariance parameter and I hope that somebody will find it.

Thank you for your useful package, which provides much more comprehensive functions to resolve the problem.

jepusto commented 10 months ago

Closing because this is not an issue with lmeInfo.