@@ -46,7 +46,7 @@ outstandR_gcomp_ml <-
46
46
47
47
outstandR_gcomp_stan <-
48
48
outstandR(AC_IPD_binY_contX, BC_ALD_binY_contX,
49
- refresh = 0, # turns off the iteration updates.
49
+ refresh = 0, # turns off the iteration updates
50
50
strategy = strategy_gcomp_stan(
51
51
formula = lin_form,
52
52
family = binomial(link = "logit")))
@@ -58,3 +58,52 @@ outstandR_mim <-
58
58
formula = lin_form,
59
59
family = binomial(link = "logit")))
60
60
```
61
+
62
+ ``` {r}
63
+ data("AC_IPD_contY_mixedX")
64
+ data("BC_ALD_contY_mixedX")
65
+
66
+ # individual-level data
67
+ head(AC_IPD_contY_mixedX)
68
+
69
+ # aggregate-level data
70
+ BC_ALD_contY_mixedX
71
+
72
+ lin_form <- as.formula("y ~ X1 + X2 + X3 + trt + trt:(X1 + X2 + X4)")
73
+
74
+ outstandR_maic <-
75
+ outstandR(AC_IPD_contY_mixedX, BC_ALD_contY_mixedX,
76
+ strategy = strategy_maic(
77
+ formula = lin_form,
78
+ family = continuous(link = "identity")))
79
+
80
+ str(outstandR_maic)
81
+
82
+ print(outstandR_maic)
83
+
84
+ outstandR_stc <-
85
+ outstandR(AC_IPD_contY_mixedX, BC_ALD_contY_mixedX,
86
+ strategy = strategy_stc(
87
+ formula = lin_form,
88
+ family = continuous(link = "identity")))
89
+
90
+ outstandR_gcomp_ml <-
91
+ outstandR(AC_IPD_contY_mixedX, BC_ALD_contY_mixedX,
92
+ strategy = strategy_gcomp_ml(
93
+ formula = lin_form,
94
+ family = continuous(link = "identity")))
95
+
96
+ outstandR_gcomp_stan <-
97
+ outstandR(AC_IPD_contY_mixedX, BC_ALD_contY_mixedX,
98
+ refresh = 0, # turns off the iteration updates
99
+ strategy = strategy_gcomp_stan(
100
+ formula = lin_form,
101
+ family = continuous(link = "identity")))
102
+
103
+ outstandR_mim <-
104
+ outstandR(AC_IPD_contY_mixedX, BC_ALD_contY_mixedX,
105
+ refresh = 0,
106
+ strategy = strategy_mim(
107
+ formula = lin_form,
108
+ family = continuous(link = "identity")))
109
+ ```
0 commit comments