Package 'varjmcm'

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

Help Index


Estimate the covariance of estimated parameters using a bootstrap based method

Description

bootcovjmcm gives the estimation of the covariance of estimated parameters returned by jmcm by using a bootstrap based method.

Usage

bootcovjmcm(object, mydata, numboot)

Arguments

object

a fitted joint mean-covariance model of class "jmcmMod", returned by the function jmcm.

mydata

the data frame used in fitting the model.

numboot

the number of the bootstrap replications

Value

an estimated covariance matrix of the estimated parameters.

References

[1] Liu, R.Y. (1988) "Bootstrap Procedure under Some Non-i.i.d. Models." Annals of Statistics, 16, 1696-1708.

Examples

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)

Estimate the covariance of estimated parameters using the explicit formula

Description

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.

Usage

covjmcm(object)

Arguments

object

a fitted joint mean-covariance model of class "jmcmMod", returned by the function jmcm.

Value

an estimated covariance matrix of the estimated parameters.

References

[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.

See Also

covjmcm_mcd, covjmcm_acd, and covjmcm_hpc

Examples

## 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)

Calculate the estimation of the covariance of estimated parameters in a ACD model, via the explicit formula.

Description

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.

Usage

covjmcm_acd(object)

Arguments

object

a fitted joint mean-covariance model of class "jmcmMod", returned by the function jmcm.

Value

an estimated covariance matrix of the estimated parameters in a ACD model.

References

[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).

See Also

covjmcm, covjmcm_mcd, and covjmcm_hpc

Examples

##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)

Calculate the estimation of the covariance of estimated parameters in a HPC model, via the explicit formula.

Description

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.

Usage

covjmcm_hpc(object)

Arguments

object

a fitted joint mean-covariance model of class "jmcmMod", returned by the function jmcm.

Value

an estimated covariance matrix of the estimated parameters in a HPC model.

References

[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.

See Also

covjmcm, covjmcm_mcd, and covjmcm_acd

Examples

##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)

Calculate the estimation of the covariance of estimated parameters in a MCD model, via the explicit formula.

Description

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.

Usage

covjmcm_mcd(object)

Arguments

object

a fitted joint mean-covariance model of class "jmcmMod", returned by the function jmcm.

Value

an estimated covariance matrix of the estimated parameters in a MCD model.

References

[1] Pourahmadi, M., "Maximum likelihood estimation of generalised linear models for multivariate normal covariance matrix," Biometrika 87(2), 425–435 (2000).

See Also

covjmcm, covjmcm_acd, and covjmcm_hpc

Examples

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)

varjmcm: Estimations for the Covariance of Estimated Parameters in Joint Mean-Covariance Models

Description

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.

References

[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.

See Also

covjmcm and bootcovjmcm for more details and examples.