Description Usage Arguments Details Value Author(s) References See Also Examples
Function that computes the two-step estimator proposed in Craiu et al.
(2011) and its print
method.
1 2 3 4 5 |
formula |
A formula object, with the response on the left of a |
data |
A data frame (or object coercible by as.data.frame to a data frame) containing the variables in the model. |
random |
A formula object, with a blank on the left of a |
all.m.1 |
|
D |
The form of the between-cluster variance-covariance matrix of the regression
coefficients (matrix D) : either |
itermax |
maximal number of EM iterations (default = 2000) |
tole |
maximal distance between successive EM iterations tolerated before declaring convergence (default = 0.000001) |
x |
An object, produced by the |
... |
Further arguments to be passed to |
Calls coxph
from the package survival.
beta |
A vector: the regression coefficients. |
se |
A vector: the regression coefficients' standard errors. |
vcov |
A matrix: the variance-covariance matrix of the regression coefficients. |
D |
A matrix: estimate of the between-cluster variance-covariance matrix of the regression coefficients (matrix D). |
r.effect |
The random effect estimates. |
coxph.warn |
A list of character string vectors. If the |
Call |
The function call. |
Radu V. Craiu, Thierry Duchesne, Daniel Fortin and Sophie Baillargeon
Craiu, R.V., Duchesne, T., Fortin, D. and Baillargeon, S. (2011), Conditional Logistic Regression with Longitudinal Follow-up and Individual-Level Random Coefficients: A Stable and Efficient Two-Step Estimation Method, Journal of Computational and Graphical Statistics. 20(3), 767-784.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Two ways for specifying the same model
# Data: bison
# Model: covariates forest, biomass and pmeadow
# Random effects in front of forest and biomass
# Main diagonal covariance structure for D (the default)
way1 <- Ts.estim(formula = Y ~ forest + biomass + pmeadow +
strata(Strata) + cluster(Cluster), data = bison,
random = ~ forest + biomass)
way1
way2 <- Ts.estim(formula = bison[,3] ~ as.matrix(bison[,c(6,8:9)]) +
strata(bison[,2]) + cluster(bison[,1]), data = bison,
random = ~ as.matrix(bison[,c(6,8)]))
way2
# Unstructured covariance for D
Fit <- Ts.estim(formula = Y ~ forest + biomass + pmeadow +
strata(Strata) + cluster(Cluster), data = bison,
random = ~ forest + biomass, D="UN")
Fit
|
Call:
Ts.estim(formula = Y ~ forest + biomass + pmeadow + strata(Strata) +
cluster(Cluster), data = bison, random = ~forest + biomass)
beta coefficients:
estimate se
forest -1.890247 0.489711
biomass 0.681348 0.972469
pmeadow -6.227671 0.635009
D = estimate of the between-cluster variance-covariance matrix D,
for the random coefficients only:
forest biomass
forest 1.970368 0.000000
biomass 0.000000 8.480526
Call:
Ts.estim(formula = bison[, 3] ~ as.matrix(bison[, c(6, 8:9)]) +
strata(bison[, 2]) + cluster(bison[, 1]), data = bison, random = ~as.matrix(bison[,
c(6, 8)]))
beta coefficients:
estimate se
forest -1.890247 0.489711
biomass 0.681348 0.972469
pmeadow -6.227671 0.635009
D = estimate of the between-cluster variance-covariance matrix D,
for the random coefficients only:
forest biomass
forest 1.970368 0.000000
biomass 0.000000 8.480526
Call:
Ts.estim(formula = Y ~ forest + biomass + pmeadow + strata(Strata) +
cluster(Cluster), data = bison, random = ~forest + biomass,
D = "UN")
beta coefficients:
estimate se
forest -1.956823 0.542426
biomass 0.387181 1.060023
pmeadow -6.227671 0.635009
D = estimate of the between-cluster variance-covariance matrix D,
for the random coefficients only:
forest biomass
forest 3.115824 6.189187
biomass 6.189187 12.302650
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.