Skip to contents

Function to create a toy dataset for package testing

Usage

makeToyData(n, changecoef.link = 0, length.panels = 1, binary = FALSE, b0 = 1)

Arguments

n

number denoting the amount of data to generate.

Coefficient on the scale of the link function to determine the overall change in the population.

length.panels

vector denoting the length of the panels to be created.

binary

logical (default = FALSE) denoting whether to generate binary data. If FALSE, poisson data is generated.

b0

intercept parameter

Value

Returns a data frame of columns x x covariate evph covariate denoting pre(0)/post(1) event mu poisson response mu.bin binary response (only if binary==TRUE) panels column denoting which panel each row corresponds to. Used to subsequently add correlation to the data.

Author

Lindesay Scott-Hayward, University of St Andrews