Skip to contents

A simulated binary outcome with two latent types of learners, for examples of fit_glm() and subgroup analysis. Forty learners are observed on 80 days. For the 20 engaged learners the log-odds of submitting an assignment rise with daily motivation (slope 1.2); for the 20 avoidant learners they fall (slope -0.6). Each learner's slope varies around the slope of the type (SD 0.15), and intercepts vary around -0.2 (SD 0.3). Daily motivation fluctuates with SD 1 around a stable average drawn with SD 0.5. The data are generated by data-raw/submissions.R in the package sources.

Usage

submissions

Format

A data.frame with 3200 rows and 5 columns:

learner

Learner identifier, 1-40.

day

Day of observation, 1-80.

type

True simulated type: "engaged" or "avoidant".

motivation

Daily motivation (continuous).

submitted

Whether an assignment was submitted that day (0 or 1).

Source

Simulated.

Examples

data(submissions)
head(submissions)
#>   learner day    type motivation submitted
#> 1       1   1 engaged  1.3284155         1
#> 2       1   2 engaged  1.5540090         1
#> 3       1   3 engaged -0.3463324         0
#> 4       1   4 engaged  0.3191570         1
#> 5       1   5 engaged -2.3165814         0
#> 6       1   6 engaged -0.1089408         0