jmcm: Fit Joint Mean-Covariance Models

Description Usage Arguments References Examples

View source: R/jmcm.R

Description

Fit a joint mean-covariance model to longitudinal data, via maximum likelihood.

Usage

1
2
3
jmcm(formula, data = NULL, triple = c(3, 3, 3), cov.method = c("mcd",
  "acd", "hpc"), optim.method = c("default", "BFGS"),
  control = jmcmControl(), start = NULL)

Arguments

formula

a two-sided linear formula object describing the covariates for both the mean and covariance matrix part of the model, with the response, the corresponding subject id and measurement time on the left of a operator~, divided by vertical bars ("|").

data

a data frame containing the variables named in formula.

triple

an integer vector of length three containing the degrees of the three polynomial functions for the mean structure, the log innovation -variances and the autoregressive or moving average coefficients when 'mcd' or 'acd' is specified for cov.method. It refers to the degree for the mean structure, variances and angles when 'hpc' is specified for cov.method.

cov.method

covariance structure modelling method, choose 'mcd' (Pourahmadi 1999), 'acd' (Chen and Dunson 2013) or 'hpc' (Zhang et al. 2015).

optim.method

optimization method, choose 'default' or 'BFGS' (vmmin in R)

control

a list (of correct class, resulting from jmcmControl()) containing control parameters, see the *jmcmControl documentation for details.

start

starting values for the parameters in the model.

References

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.

Examples

1
2
3
4
5
cattleA <- cattle[cattle$group=='A', ]
fit.mcd <- jmcm(weight | id | I(ceiling(day/14 + 1)) ~ 1 | 1,
data=cattleA, triple = c(8, 4, 3), cov.method = 'mcd', 
control = jmcmControl(trace = TRUE, ignore.const.term = FALSE, 
original.poly.order = TRUE))

Example output

    0:    2428.87:    1.9410e+02   9.7276e+01  -1.1424e+02   6.5834e+01  -1.9881e+01   3.4259e+00  -3.3943e-01   1.7982e-02  -3.9423e-04   4.2045e+00  -3.7224e-01   1.0816e-01  -6.3047e-03   1.3078e-09   4.2750e-09   2.0217e-08   1.1987e-07   8.1388e-07
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:    2304.73:    4.2045  -0.3722   0.1084  -0.0042
    1:    2225.41:    4.2155  -0.3382   0.2045  -0.0146
    2:    2175.53:    4.6916   0.3098  -0.0244   0.0013
    3:     2164.2:    3.0147   1.4018  -0.2336   0.0125
    4:    2147.99:    4.1065   0.5309  -0.0698   0.0035
    5:     2146.9:    4.5022   0.1775   0.0062  -0.0009
    6:    2146.78:    4.4593e+00   2.3510e-01  -8.2010e-03   3.7319e-05
    7:    2146.78:    4.4597e+00   2.3409e-01  -8.0541e-03   2.7486e-05
    8:    2146.78:    4.4604e+00   2.3391e-01  -8.0182e-03   2.6148e-05
    9:    2146.78:    4.4604e+00   2.3389e-01  -8.0152e-03   2.5988e-05
   10:    2146.78:    4.4604e+00   2.3389e-01  -8.0151e-03   2.5979e-05
--------------------------------------------------
    1:    1885.18:    2.0506e+02   7.0678e+01  -8.9686e+01   5.4277e+01  -1.6786e+01   2.9355e+00  -2.9399e-01   1.5709e-02  -3.4685e-04   4.4604e+00   2.3389e-01  -8.0151e-03   2.5979e-05   2.1745e+00  -1.6932e+00   4.4836e-01  -4.8938e-02   1.8858e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:    1636.73:    4.4604   0.2338  -0.0084  -0.0034
    1:    1576.79:    4.4530   0.2040  -0.1125   0.0072
    2:     1549.4:    4.1826  -0.2913   0.0182  -0.0005
    3:    1518.54:    7.1560  -2.2558   0.3609  -0.0175
    4:    1493.16:    5.9016  -1.2803   0.2070  -0.0103
    5:    1485.53:    5.9050  -1.4571   0.2583  -0.0139
    6:    1485.39:    5.7857  -1.4001   0.2488  -0.0135
    7:    1485.38:    5.7777  -1.3916   0.2467  -0.0133
    8:    1485.38:    5.7771  -1.3901   0.2463  -0.0133
    9:    1485.38:    5.7767  -1.3897   0.2462  -0.0133
   10:    1485.38:    5.7766  -1.3896   0.2462  -0.0133
   11:    1485.38:    5.7766  -1.3896   0.2462  -0.0133
--------------------------------------------------
    2:    1484.38:    2.0171e+02   7.8956e+01  -9.7507e+01   5.8047e+01  -1.7819e+01   3.1024e+00  -3.0973e-01   1.6508e-02  -3.6372e-04   5.7766e+00  -1.3896e+00   2.4622e-01  -1.3292e-02   1.9910e+00  -1.4588e+00   3.6309e-01  -3.7369e-02   1.3632e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:    1484.31:    5.7766  -1.3896   0.2462  -0.0133
    1:    1484.31:    5.7767  -1.3895   0.2463  -0.0133
    2:     1484.3:    5.7817  -1.3810   0.2437  -0.0132
    3:     1484.3:    5.7595  -1.3660   0.2411  -0.0130
    4:     1484.3:    5.7593  -1.3659   0.2411  -0.0130
    5:     1484.3:    5.7593  -1.3659   0.2411  -0.0130
--------------------------------------------------
    3:     1484.3:    1.9610e+02   9.2414e+01  -1.0984e+02   6.3843e+01  -1.9378e+01   3.3517e+00  -3.3313e-01   1.7696e-02  -3.8884e-04   5.7593e+00  -1.3659e+00   2.4106e-01  -1.3018e-02   1.9869e+00  -1.4532e+00   3.6095e-01  -3.7068e-02   1.3492e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7593  -1.3659   0.2411  -0.0130
    1:     1484.3:    5.7594  -1.3657   0.2410  -0.0130
    2:     1484.3:    5.7596  -1.3653   0.2409  -0.0130
    3:     1484.3:    5.7579  -1.3642   0.2407  -0.0130
    4:     1484.3:    5.7579  -1.3643   0.2407  -0.0130
    5:     1484.3:    5.7579  -1.3643   0.2407  -0.0130
--------------------------------------------------
    4:     1484.3:    1.9569e+02   9.3417e+01  -1.1075e+02   6.4271e+01  -1.9492e+01   3.3697e+00  -3.3477e-01   1.7778e-02  -3.9053e-04   5.7579e+00  -1.3643e+00   2.4074e-01  -1.3000e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7579  -1.3643   0.2407  -0.0130
    1:     1484.3:    5.7579  -1.3643   0.2407  -0.0130
    2:     1484.3:    5.7579  -1.3643   0.2407  -0.0130
    3:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    4:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
--------------------------------------------------
    5:     1484.3:    1.9568e+02   9.3439e+01  -1.1077e+02   6.4281e+01  -1.9494e+01   3.3701e+00  -3.3481e-01   1.7779e-02  -3.9057e-04   5.7578e+00  -1.3643e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
--------------------------------------------------
    6:     1484.3:    1.9567e+02   9.3466e+01  -1.1080e+02   6.4292e+01  -1.9497e+01   3.3705e+00  -3.3485e-01   1.7782e-02  -3.9061e-04   5.7578e+00  -1.3643e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
--------------------------------------------------
    7:     1484.3:    1.9567e+02   9.3471e+01  -1.1080e+02   6.4294e+01  -1.9498e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3643e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    2:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    3:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    4:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    5:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
--------------------------------------------------
    8:     1484.3:    1.9567e+02   9.3468e+01  -1.1080e+02   6.4293e+01  -1.9497e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3643e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    2:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    3:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    4:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
--------------------------------------------------
    9:     1484.3:    1.9567e+02   9.3470e+01  -1.1080e+02   6.4294e+01  -1.9498e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3643e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    2:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    3:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    4:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    5:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
--------------------------------------------------
   10:     1484.3:    1.9567e+02   9.3469e+01  -1.1080e+02   6.4293e+01  -1.9497e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3643e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    2:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    3:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
--------------------------------------------------
   11:     1484.3:    1.9567e+02   9.3470e+01  -1.1080e+02   6.4294e+01  -1.9498e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3642e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    2:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    3:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    4:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
    5:     1484.3:    5.7578  -1.3643   0.2407  -0.0130
--------------------------------------------------
   12:     1484.3:    1.9567e+02   9.3469e+01  -1.1080e+02   6.4294e+01  -1.9498e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3642e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    2:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    3:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    4:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    5:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
--------------------------------------------------
   13:     1484.3:    1.9567e+02   9.3469e+01  -1.1080e+02   6.4294e+01  -1.9498e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3642e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    2:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    3:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    4:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    5:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
--------------------------------------------------
   14:     1484.3:    1.9567e+02   9.3469e+01  -1.1080e+02   6.4294e+01  -1.9498e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3642e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
--------------------------------------------------
   15:     1484.3:    1.9567e+02   9.3469e+01  -1.1080e+02   6.4294e+01  -1.9498e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3642e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    2:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    3:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    4:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    5:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
--------------------------------------------------
   16:     1484.3:    1.9567e+02   9.3469e+01  -1.1080e+02   6.4294e+01  -1.9498e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3642e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
--------------------------------------------------
   17:     1484.3:    1.9567e+02   9.3469e+01  -1.1080e+02   6.4294e+01  -1.9498e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3642e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03
--------------------------------------------------
 Updating Innovation Variance Parameters...
    0:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    1:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    2:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    3:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    4:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
    5:     1484.3:    5.7578  -1.3642   0.2407  -0.0130
--------------------------------------------------
   18:     1484.3:    1.9567e+02   9.3469e+01  -1.1080e+02   6.4294e+01  -1.9498e+01   3.3706e+00  -3.3486e-01   1.7782e-02  -3.9062e-04   5.7578e+00  -1.3642e+00   2.4072e-01  -1.2999e-02   1.9867e+00  -1.4529e+00   3.6084e-01  -3.7053e-02   1.3485e-03

jmcm documentation built on Jan. 16, 2021, 5:32 p.m.

Related to jmcm in jmcm...