sim.my(n, seed, label, alpha, beta, e. = NULL, b. = NULL, tr. = NULL)
Value
A data frame with columns: y, x.star, x.star.expit (if label starts with sigmoid), x.star.tr (if label starts with elbow), x.bin.med (x.star dichotomized at median), x.tri (x.star trichotomized at tertiles).
Arguments
n
Sample size
seed
Seed for random number generator
label
A character string which specifies the simulation scenario. sigmoid4, sigmoidgam4, elbow4
alpha
regression parameter
beta
regression parameter
e.
inflection point for the logistic transformation (the log scale)
b.
slope for the logistic transformation
tr.
threshold point
Details
When the label starts with elbow, the transformation on x.star is elbow shaped.
When the label starts with sigmoid, the transformation on x.star is sigmoid shaped.
Data simulated from logit(Pr(Y==1))=alpha + beta*(transformed x.star).