Description Usage Arguments Details Value Examples
Generate a simulated dataset, which could be used to demonstrate the features of the mpersonalized package.
1 | simulated_dataset(n, problem = c("meta-analysis", "multiple outcomes"))
|
n |
Sample size for each study/outcome. |
problem |
A character string specified what problem the simulated dataset is
generated for. |
In the simulated dataset, outcomes are generated from the model
Y = δ_0 + \bm{X} \bm{δ} + A (θ_0 + \bm{X}\bm{θ})+ε,
where \bm{X} is the baseline covariates and A is the treatment indicator coded as 0,1. For different outcomes or studies, values of δ_0, \bm{δ}, θ_0 and \bm{θ} are also different so as to represent the heterogeneity in real problems.
The number of different studies/outcomes is set to be 6 and total number of candidate covariates is 50. Treatment indicator A is generated with equal probability of 0 or 1.
This function randomly generates the coefficients for each study/outcome and then
generates the baseline covariates and error term for each subject. Depending on the
value of problem
, generation of baseline covariates are slightly different.
For problem = "meta-analysis"
, baseline covariates are generated independently
for each study; for problem = "multiple outcomes"
, baseline covariates are
the same across different outcomes.
A list object of the ingredients from the simulated dataset. The elements of
this list depends on value of problem
.
For problem = "meta-analysis"
,
Xlist |
a list object with kth element denoting the baseline covariate matrix of kth study |
Ylist |
a list object with kth element denoting the response vector of kth study |
Trtlist |
a list object with kth element denoting the treatment vector of kth study and coded as 0 or 1 |
B |
the coefficient matrix containing δ_0, \bm{δ}, θ_0 and \bm{θ} |
For problem = "multiple outcomes"
,
X |
a matrix object denoting the baseline covariate matrix |
Ylist |
a list object with kth element denoting the response vector of kth outcome |
Trt |
a vector denoting the treatment and coded as 0 or 1) |
B |
the coefficient matrix containing δ_0, \bm{δ}, θ_0 and \bm{θ} |
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.