tips:clogit_paired_binary_data
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
tips:clogit_paired_binary_data [2021/11/08 13:08] – Wolfgang Viechtbauer | tips:clogit_paired_binary_data [2022/08/03 11:31] (current) – Wolfgang Viechtbauer | ||
---|---|---|---|
Line 12: | Line 12: | ||
ci <- c(rep(0, | ci <- c(rep(0, | ||
di <- 1-ci | di <- 1-ci | ||
- | ### change data to long format | + | ### change data to long format |
event <- c(rbind(ai, | event <- c(rbind(ai, | ||
group <- rep(c(1,0), times=n) | group <- rep(c(1,0), times=n) | ||
Line 26: | Line 26: | ||
<code output> | <code output> | ||
Call: | Call: | ||
- | coxph(formula = Surv(rep(1, 200L), event) ~ group + strata(id), | + | coxph(formula = Surv(rep(1, 200L), event) ~ group + strata(id), |
method = " | method = " | ||
- | n= 200, number of events= 90 | + | n= 200, number of events= 90 |
- | coef exp(coef) se(coef) | + | coef exp(coef) se(coef) |
group 0.8109 | group 0.8109 | ||
--- | --- | ||
Line 56: | Line 56: | ||
Formula: event ~ group + (1 | id) | Formula: event ~ group + (1 | id) | ||
- | | + | |
- | | + | |
- | Scaled residuals: | + | Scaled residuals: |
- | Min 1Q Median | + | Min 1Q Median |
- | -1.1703 -0.4314 -0.2876 | + | -1.1703 -0.4314 -0.2876 |
Random effects: | Random effects: | ||
| | ||
- | | + | |
Number of obs: 200, groups: | Number of obs: 200, groups: | ||
Fixed effects: | Fixed effects: | ||
- | Estimate Std. Error z value Pr(> | + | Estimate Std. Error z value Pr(>|z|) |
(Intercept) | (Intercept) | ||
group | group | ||
Line 87: | Line 87: | ||
Results: | Results: | ||
<code output> | <code output> | ||
- | Call: glmmML(formula = event ~ group, family = binomial, cluster = id, method = " | + | Call: glmmML(formula = event ~ group, family = binomial, cluster = id, method = " |
Line 94: | Line 94: | ||
group 0.8109 | group 0.8109 | ||
- | Scale parameter in mixing distribution: | + | Scale parameter in mixing distribution: |
- | Std. Error: | + | Std. Error: |
- | LR p-value for H_0: sigma = 0: 2.461e-07 | + | LR p-value for H_0: sigma = 0: 2.461e-07 |
Residual deviance: 247.9 on 197 degrees of freedom | Residual deviance: 247.9 on 197 degrees of freedom | ||
Line 132: | Line 132: | ||
Tests for Heterogeneity: | Tests for Heterogeneity: | ||
Wld(df = 25) = NA, p-val = NA | Wld(df = 25) = NA, p-val = NA | ||
- | LRT(df = 25) = 32.0966, p-val = 0.1552 | + | LRT(df = 25) = 32.0966, p-val = 0.1552 |
Model Results: | Model Results: | ||
- | estimate | + | estimate |
- | 0.8109 | + | 0.8109 |
--- | --- | ||
Line 143: | Line 143: | ||
</ | </ | ||
Results again match what we obtained above. | Results again match what we obtained above. | ||
+ |
tips/clogit_paired_binary_data.txt · Last modified: 2022/08/03 11:31 by Wolfgang Viechtbauer