Skip to content

Commit d692d7a

Browse files
committed
2nd example
1 parent 724b2ee commit d692d7a

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

inst/joss_code.Rmd

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ outstandR_gcomp_ml <-
4646
4747
outstandR_gcomp_stan <-
4848
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
5050
strategy = strategy_gcomp_stan(
5151
formula = lin_form,
5252
family = binomial(link = "logit")))
@@ -58,3 +58,52 @@ outstandR_mim <-
5858
formula = lin_form,
5959
family = binomial(link = "logit")))
6060
```
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

Comments
 (0)