Description Usage Arguments Details Value Author(s) References Examples
Estimates odds ratio adjusted for a vector of covariates
1 | partialOR(dd,ci=0.95)
|
dd |
Data frame with binary 0/1 response variables x,y and covariates z1,...,zm (in that order) |
ci |
Confidence level (default ci=0.95) |
partialOR()
estimates the adjusted odds ratio OR(X,Y | Z1,...,Zm)
between two binary variables X and Y adjusted for a vector
(Z1,...,Zm) of m numerical covariates ("confounders"). It is
based on fitting a multinomial logistic regression model to the data.
In this model the categorical response variable corresponds to
the four possible outcomes of (X,Y), namely (0,0), (0,1), (1,0)
and (1,1). The program fits the null model (without covariates),
the full F-model and the H-modelwith parameters restricted by
the hypothesis of homogeneity of odds ratio's.
The homogeneity hypothesis is tested by comparing the two
models by the Likelihood Ratio test.
The program reports OR estimates under the respective models,
the standard errors of log(OR) and confidence intervals.
Note: to include categorical covariates the user has to transform
them into dummy variables.
The program prints information about the convergence
of the optimizer, the model deviances, the LR-test and the
adjusted odds ratios. It calls the function
fitOR()
which, when called separatelly, returns detailed
information on model fitting.
Vaclav Fidler and Nico Nagelkerke
Fidler, V. and Nagelkerke, N.J.D. (2012) The Mantel-Haenszel procedure revisited: models and generalizations. Submitted.
1 2 3 4 |
Loading required package: nnet
# weights: 8 (3 variable)
initial value 69.314718
final value 69.114278
converged
# weights: 16 (9 variable)
initial value 69.314718
iter 10 value 61.070235
final value 61.060359
converged
Partial Odds Ratio estimation
Model Deviance
Null 138.23
Full 122.12
Homogen. 125.69
LR-test of homogeneity: LR = 3.568 ,df = 2 , P-value = 0.168
Unadjusted OR:
log(OR) = 0.3212 , SE = 0.568
OR = 1.379 , 95%-CI: 0.453 to 4.197
MH-type Full model estimate:
log(OR) = 0.6423 , SE = 0.6016
OR = 1.901 , 95%-CI: 0.585 to 6.181
Homogeneity-model estimate:
log(OR) = 0.6696 , SE = 0.6535
OR = 1.953 , 95%-CI: 0.543 to 7.032
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.