Title: | Estimations for the Covariance of Estimated Parameters in Joint Mean-Covariance Models |
---|---|
Description: | The goal of the package is to equip the 'jmcm' package (current version 0.2.1) with estimations of the covariance of estimated parameters. Two methods are provided. The first method is to use the inverse of estimated Fisher's information matrix, see M. Pourahmadi (2000) <doi:10.1093/biomet/87.2.425>, M. Maadooliat, M. Pourahmadi and J. Z. Huang (2013) <doi:10.1007/s11222-011-9284-6>, and W. Zhang, C. Leng, C. Tang (2015) <doi:10.1111/rssb.12065>. The second method is bootstrap based, see Liu, R.Y. (1988) <doi:10.1214/aos/1176351062> for reference. |
Authors: | Naimin Jing [aut, cre], Hexin Bai [aut], Tong Wang [aut], Cheng Yong Tang [aut] |
Maintainer: | Naimin Jing <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.1 |
Built: | 2024-11-17 06:43:18 UTC |
Source: | CRAN |
bootcovjmcm
gives the estimation of the covariance of estimated parameters returned by jmcm
by using a bootstrap based method.
bootcovjmcm(object, mydata, numboot)
bootcovjmcm(object, mydata, numboot)
object |
a fitted joint mean-covariance model of class "jmcmMod", returned by the function |
mydata |
the data frame used in fitting the model. |
numboot |
the number of the bootstrap replications |
an estimated covariance matrix of the estimated parameters.
[1] Liu, R.Y. (1988) "Bootstrap Procedure under Some Non-i.i.d. Models." Annals of Statistics, 16, 1696-1708.
cattleA <- cattle[cattle$group=='A', ] fit.mcd <- jmcm(weight|id|I(ceiling(day/14+1))~1|1, data = cattleA, cov.method = "mcd", triple = c(1,1,1)) bootcovjmcm(fit.mcd, cattleA, 5) ## Larger number of replications is needed to achieve accuracy, ## however it may take hours. bootcovjmcm(fit.mcd, cattleA, 500)
cattleA <- cattle[cattle$group=='A', ] fit.mcd <- jmcm(weight|id|I(ceiling(day/14+1))~1|1, data = cattleA, cov.method = "mcd", triple = c(1,1,1)) bootcovjmcm(fit.mcd, cattleA, 5) ## Larger number of replications is needed to achieve accuracy, ## however it may take hours. bootcovjmcm(fit.mcd, cattleA, 500)
covjmcm
is a combination of covjmcm_mcd
, covjmcm_acd
, and covjmcm_hpc
.
It identifies the corresponding type of the model, i.e. MCD, ACD, or HPC, and calculates the estimation
of the covariance of estimated parameters using explicit formula,
which is the inverse of the estimated Fisher's information matrix.
covjmcm(object)
covjmcm(object)
object |
a fitted joint mean-covariance model of class "jmcmMod", returned by the function |
an estimated covariance matrix of the estimated parameters.
[1] Pourahmadi, M., "Maximum likelihood estimation of generalised linear models for multivariate normal covariance matrix," Biometrika 87(2), 425–435 (2000).
[2] M. Maadooliat, M. Pourahmadi and J. Z. Huang, "Robust estimation of the correlation matrix of longitudinal data", Statistics and Computing 23, 17-28, (2013).
[3] W. Zhang, C. Leng, and C. Y. Tang(2015), "A joint modelling approach for longitudinal studies," Journal of the Royal Statistical Society. Series B. 77, 219-238.
covjmcm_mcd
, covjmcm_acd
, and covjmcm_hpc
## balanced data cattleA <- cattle[cattle$group=='A', ] fit.mcd <- jmcm(weight|id|I(ceiling(day/14+1))~1|1, data = cattleA, cov.method = "mcd", triple = c(8,3,4)) cov.mcd <- covjmcm(fit.mcd) ##same as covjmcm_mcd(fit.mcd) ## unbalanced data ## This may take about 1.25 min. fit.hpc <- jmcm(I(sqrt(cd4)) | id | time ~ 1 | 1, data = aids, triple = c(8,1,1), cov.method = "hpc") cov.hpc <- covjmcm(fit.hpc) ##same as covjmcm_hpc(fit.hpc)
## balanced data cattleA <- cattle[cattle$group=='A', ] fit.mcd <- jmcm(weight|id|I(ceiling(day/14+1))~1|1, data = cattleA, cov.method = "mcd", triple = c(8,3,4)) cov.mcd <- covjmcm(fit.mcd) ##same as covjmcm_mcd(fit.mcd) ## unbalanced data ## This may take about 1.25 min. fit.hpc <- jmcm(I(sqrt(cd4)) | id | time ~ 1 | 1, data = aids, triple = c(8,1,1), cov.method = "hpc") cov.hpc <- covjmcm(fit.hpc) ##same as covjmcm_hpc(fit.hpc)
covjmcm_acd
calculates the estimation of the covariance of estimated parameters in a ACD model using
the explicit formula, which is the inverse of the estimated Fisher's information matrix.
covjmcm_acd(object)
covjmcm_acd(object)
object |
a fitted joint mean-covariance model of class "jmcmMod", returned by the function |
an estimated covariance matrix of the estimated parameters in a ACD model.
[1] M. Maadooliat, M. Pourahmadi and J. Z. Huang, "Robust estimation of the correlation matrix of longitudinal data", Statistics and Computing 23, 17-28, (2013).
covjmcm
, covjmcm_mcd
, and covjmcm_hpc
##This may take more than 5s. cattleA <- cattle[cattle$group=='A', ] fit.acd <- jmcm(weight|id|I(ceiling(day/14+1))~1|1, data = cattleA, cov.method = "acd", triple = c(8,3,4)) cov.acd <- covjmcm_acd(fit.acd)
##This may take more than 5s. cattleA <- cattle[cattle$group=='A', ] fit.acd <- jmcm(weight|id|I(ceiling(day/14+1))~1|1, data = cattleA, cov.method = "acd", triple = c(8,3,4)) cov.acd <- covjmcm_acd(fit.acd)
covjmcm_hpc
gives the estimation of the covariance of estimated parameters in a HPC model using
the explicit formula, which is the inverse of the estimated Fisher's information matrix.
covjmcm_hpc(object)
covjmcm_hpc(object)
object |
a fitted joint mean-covariance model of class "jmcmMod", returned by the function |
an estimated covariance matrix of the estimated parameters in a HPC model.
[1] W. Zhang, C. Leng, and C. Y. Tang(2015), "A joint modelling approach for longitudinal studies," Journal of the Royal Statistical Society. Series B. 77, 219-238.
covjmcm
, covjmcm_mcd
, and covjmcm_acd
##This may take more than 1 min. cattleA <- cattle[cattle$group=='A', ] fit.hpc <- jmcm(weight|id|I(ceiling(day/14+1))~1|1, data = cattleA, cov.method = "hpc", triple = c(8,3,4)) cov.hpc <- covjmcm_hpc(fit.hpc)
##This may take more than 1 min. cattleA <- cattle[cattle$group=='A', ] fit.hpc <- jmcm(weight|id|I(ceiling(day/14+1))~1|1, data = cattleA, cov.method = "hpc", triple = c(8,3,4)) cov.hpc <- covjmcm_hpc(fit.hpc)
covjmcm_mcd
gives an estimation of the covariance of estimated parameters in a MCD model using
the explicit formula, which is the inverse of the estimated Fisher's information matrix.
covjmcm_mcd(object)
covjmcm_mcd(object)
object |
a fitted joint mean-covariance model of class "jmcmMod", returned by the function |
an estimated covariance matrix of the estimated parameters in a MCD model.
[1] Pourahmadi, M., "Maximum likelihood estimation of generalised linear models for multivariate normal covariance matrix," Biometrika 87(2), 425–435 (2000).
covjmcm
, covjmcm_acd
, and covjmcm_hpc
cattleA <- cattle[cattle$group=='A', ] fit.mcd <- jmcm(weight|id|I(ceiling(day/14+1))~1|1, data = cattleA, cov.method = "mcd", triple = c(8,3,4)) cov.mcd <- covjmcm_mcd(fit.mcd)
cattleA <- cattle[cattle$group=='A', ] fit.mcd <- jmcm(weight|id|I(ceiling(day/14+1))~1|1, data = cattleA, cov.method = "mcd", triple = c(8,3,4)) cov.mcd <- covjmcm_mcd(fit.mcd)
The package provides estimations of the covariance of estimated parameters in joint
mean-covariance models, which is fitted in 'jmcm' package. Two methods are available.
bootcovjmcm
calculates the covariance estimation via a bootstrap based method. covjmcm
uses explicit formula, i.e. the inverse of the estimated Fisher's information, to calculate the covariance estimation.
The bootstrap method may need large number of replications and thus may be time consuming.
The explicit formula in the second method is asymptotically correct, and thus is valid only when the sample size is large.
[1] Pan J, Pan Y (2017). "jmcm: An R Package for Joint Mean-Covariance Modeling of Longitudinal Data." Journal of Statistical Software, 82(9), 1–29.
[2] Pourahmadi, M., "Maximum likelihood estimation of generalised linear models for multivariate normal covariance matrix," Biometrika 87(2), 425–435 (2000).
[3] M. Maadooliat, M. Pourahmadi and J. Z. Huang, "Robust estimation of the correlation matrix of longitudinal data", Statistics and Computing 23, 17-28, (2013).
[4] W. Zhang, C. Leng, and C. Y. Tang(2015), "A joint modelling approach for longitudinal studies," Journal of the Royal Statistical Society. Series B. 77, 219-238.
covjmcm
and bootcovjmcm
for more details and examples.