Description Usage Arguments Details Value Author(s) References Examples

Generate simulated data from logistic mixed effects model based on the AMD data.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
genSimDataGLMEM(
nSubj = 131,
beta0 = -6,
sd.beta0i = 1.58,
beta1 = 1.58,
beta2 = -3.95,
beta3 = 3.15,
beta4 = 2.06,
beta5 = 0.51,
beta6 = 1.47,
beta7 = 3.11,
p.smkcur = 0.08,
p.inieye31 = 0.44,
p.inieye32 = 0.42,
p.inieye41 = 0.12,
p.inieye42 = 0.11,
sd.lncalorc = 0.33)
``` |

`nSubj` |
integer. Number of subjects. Each subject would have data for 2 eyes. |

`beta0` |
mean of intercept |

`sd.beta0i` |
standard deviation |

`beta1` |
slope for the binary covariate |

`beta2` |
slope for the continuous mean-centered covariate |

`beta3` |
slope for the binary covariate |

`beta4` |
slope for the binary covariate |

`beta5` |
slope for the binary covariate |

`beta6` |
slope for the binary covariate |

`beta7` |
slope for the binary covariate |

`p.smkcur` |
proportion of current smokers. |

`p.inieye31` |
proportion of left eye having inital grade equal to 3. |

`p.inieye32` |
proportion of right eye having inital grade equal to 3. |

`p.inieye41` |
proportion of left eye having inital grade equal to 4. |

`p.inieye42` |
proportion of right eye having inital grade equal to 4. |

`sd.lncalorc` |
standard deviation for |

We generate simulated data set from the following generalized linear mixed effects model:

*
logit(p_{ij})=beta_{0i}+beta_1 smkcur_i+
beta_2 lncalor_{ci} + beta_3 inieye3_{ij} + beta_4 inieye4_{ij}
+β_5 rtotfat_{1i} +β_6 rtotfat_{2i} + β_7 rtotfat_{3i},
*

*i=1, ..., N, j=1, 2*,
*
beta_{0i}~ N(beta_0, sigma^2_{β}).
*

A data frame with 8 columns: cid, subuid, prog, smkcur, lncalorc, inieye3, inieye4, and rtotfat,
where cid is the subject id, subuid is the unit id, and prog is the progression status.
*prog=1* indicates the eye is progressed.
*prog=0* indicates the eye is not progressed.
There are `nSubj*2`

rows. The first `nSubj`

rows
are for the left eyes and the second `nSubj`

rows are for the right eyes.

Bernard Rosner <stbar@channing.harvard.edu>, Weiliang Qiu <Weiliang.Qiu@gmail.com>, Meiling Ting Lee <MLTLEE@umd.edu>

Rosner B, Qiu W, and Lee MLT. Assessing Discrimination of Risk Prediction Rules in a Clustered Data Setting. Lifetime Data Anal. 2013 Apr; 19(2): 242-256.

1 2 3 4 5 6 7 8 | ```
set.seed(1234567)
datFrame = genSimDataGLMEM(nSubj = 30, beta0 = -6, sd.beta0i = 1.58,
beta1 = 1.58, beta2 = -3.95, beta3 = 3.15, beta4 = 2.06,
beta5 = 0.51, beta6 = 1.47, beta7 = 3.11,
p.smkcur = 0.08, p.inieye31 = 0.44, p.inieye32 = 0.42,
p.inieye41 = 0.12, p.inieye42 = 0.11, sd.lncalorc = 0.33)
print(dim(datFrame))
print(datFrame[1:2,])
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.