# NOT RUN {
## ordinal data, show true parameter values
sim <- gjamSimData(S = 5, typeNames = 'OC')
sim$ydata[1:5,] # example data
sim$trueValues$cuts # simulated partition
sim$trueValues$beta # coefficient matrix
## continuous data censored at zero, note latent w for obs y = 0
sim <- gjamSimData(n = 5, S = 5, typeNames = 'CA')
sim$w
sim$y
## continuous and discrete data
types <- c(rep('DA',5), rep('CA',4))
sim <- gjamSimData(n = 10, S = length(types), Q = 4, typeNames = types)
sim$typeNames
sim$ydata
## composition count data
sim <- gjamSimData(n = 10, S = 8, typeNames = 'CC')
totalCount <- rowSums(sim$ydata)
cbind(sim$ydata, totalCount) # data with sample effort
## multiple categorical responses - compare matrix y and data.frqme ydata
types <- rep('CAT',2)
sim <- gjamSimData(S = length(types), typeNames = types)
head(sim$ydata)
head(sim$y)
## discrete abundance, heterogeneous effort
S <- 5
n <- 1000
ef <- list( columns = 1:S, values = round(runif(n,.5,5),1) )
sim <- gjamSimData(n, S, typeNames = 'DA', effort = ef)
sim$effort$values[1:20]
## combinations of scales, partition only for 'OC' columns
types <- c('OC','OC','OC','CC','CC','CC','CC','CC','CA','CA','PA','PA')
sim <- gjamSimData(S = length(types), typeNames = types)
sim$typeNames
head(sim$ydata)
sim$trueValues$cuts
# }
Run the code above in your browser using DataLab