This is a functoin to generate example missing data for PWLS
generate_pwls_missing_data(
p = 20,
n = 200,
pt1 = 0.5,
pt2 = 0.5,
tbeta = c(1, -1, 1, -1, 1, -1, -1, 1),
miss_sig = c(0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0)
)
A Matrix,missing data with variables X in the first p columns and response Y at the last column.
The dimension of the independent variable X,default 20.
The Number of rows of generated data,default 200.
Missing rate of independent variable X,default 0.5.
Missing rate of response Y, default 0.5.
True value of the coefficient,default c(1,-1,1,-1,1,-1,-1,1).
A 0-1 vector of length p, where 1 means that variable at the index is with missing,while 0 means that it without missing,defualt c(0,1,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0)