relRisk.RdFit a Relative Risk Model for Binary data with Log Link using the COPY method.
relRisk(
formula,
id,
waves = NULL,
data = parent.frame(),
subset = NULL,
contrasts = NULL,
na.action = na.omit,
corstr = "indep",
ncopy = 1000,
control = geese.control(),
b = NULL,
alpha = NULL
)same as in geese
same as in geese
same as in geese
same as in geese
same as in geese
same as in geese
same as in geese
same as in geese
the number of copies of the original data in constructing weight.
same as in geese
initial values for regression coefficients as in
geese but more difficult to obtain due to the log link.
same as in geese
An object of class "geese" representing the fit.
Lumley, T., Kornmal, R. and Ma, S. (2006). Relative risk regression in medical research: models, contrasts, estimators, and algorithms. UW Biostatistics Working Paper Series 293, University of Washington.
## this example was used in Yu and Yan (2010, techreport)
data(respiratory)
respiratory$treat <- relevel(respiratory$treat, ref = "P")
respiratory$sex <- relevel(respiratory$sex, ref = "M")
respiratory$center <- as.factor(respiratory$center)
## 1 will be the reference level
fit <- relRisk(outcome ~ treat + center + sex + age + baseline + visit,
id = id, corstr = "ar1", data = respiratory, ncopy=10000)
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: step size truncated due to divergence
#> Warning: glm.fit: algorithm did not converge
#> Warning: glm.fit: algorithm stopped at boundary value
summary(fit)
#>
#> Call:
#> relRisk(formula = outcome ~ treat + center + sex + age + baseline +
#> visit, id = id, data = respiratory, corstr = "ar1", ncopy = 10000)
#>
#> Mean Model:
#> Mean Link: log
#> Variance to Mean Relation: binomial
#>
#> Coefficients:
#> estimate san.se wald p
#> (Intercept) -1.067172 0.14658 53.0079 3.322e-13
#> treatA 0.383759 0.09608 15.9537 6.491e-05
#> center2 0.049071 0.06179 0.6307 4.271e-01
#> sexF 0.068237 0.07173 0.9048 3.415e-01
#> age -0.001451 0.00153 0.8994 3.429e-01
#> baseline 0.688950 0.13276 26.9297 2.110e-07
#> visit -0.035775 0.02009 3.1697 7.501e-02
#>
#> Scale is fixed.
#>
#> Correlation Model:
#> Correlation Structure: ar1
#> Correlation Link: identity
#>
#> Estimated Correlation Parameters:
#> estimate san.se wald p
#> alpha 0.0008631 0.0001281 45.43 1.578e-11
#>
#> Returned Error Value: 0
#> Number of clusters: 222 Maximum cluster size: 4
#>
## fit <- relRisk(outcome ~ treat + center + sex + age + baseline + visit,
## id = id, corstr = "ex", data = respiratory)
## summary(fit)
## fit <- relRisk(outcome ~ treat + center + sex + age + baseline + visit,
## id = id, corstr = "indep", data = respiratory)
## summary(fit)