GenerateMixData {inarmix} | R Documentation |
This function generates data according to a user-specified INAR mixture model. It returns a data frame which can be used immediately by inarmix.
GenerateMixData(m, coefs, autocorr, scale=NULL, mix, design.mat, return.labels=F,poisson=F)
m |
a numeric scalar (the number of subjects) |
coefs |
a numeric vector |
autocorr |
a numeric scalar |
scale |
a numerica scalar |
mix |
a numeric vector |
design.mat |
a numeric matrix (the design matrix) |
return.labels |
an indicator of whether or not to return the class labels |
poisson |
an indicator of whether or not the data should have marginal Poisson distributions. |
A data frame which contains the response and a subject identifier. The other columns contain the data entered from the design.mat argument.
Nicholas Henderson
XX <- cbind(rep(1,9),c(0:8)/4) colnames(XX) <- c("const","time") coefs <- rbind(c(-.2,0),c(1.2,.3)) autocorr <- c(.2,.2) scale <- c(1.5,1.5) mix.prop <- c(.8,.2) testdat <- GenerateMixData(1000,coefs,autocorr,scale,mix.prop,XX)