Description Usage Arguments Value Examples
Simulated data to use in GLMM
1 | simDataGLMM(clus, rep, fixedMean, covM, disFam)
|
clus |
The number of clusters wanted. |
rep |
The number of repetitions in each cluster. |
fixedMean |
A fixed value to enter the linear predictor. In case of multivariate data, the dimension needs to equal the number of variables. |
covM |
The variance of the random component representing variation between clusters. In case of multidimensional data, the dimension needs to equal the number of variables. |
disFam |
The distribution family. The canonical link function is chosen. |
A data frame with columns 'Observation' (number of observation), 'Cluster' (factor) and one column for each output dimension, 'X1', 'X2', etc.
1 2 3 4 5 6 | # Simulates 3 blocks with 5 repetitions in each. The linear predictor is 10+random component with variance 5.
data1dim <- simDataGLMM(clus=3,rep=5,fixedMean=10,covM=5,disFam = poisson())
# Simulates 3 blocks with 5 repetitions in each for 3 variables. The linear predictor is 10+random component with defined covariance matrix.
A <- matrix(runif(3^2)*2-1, ncol=3)
sigma <- t(A) %*% A
data3dim <- simDataGLMM(clus=3,rep=5,fixedMean=rep(10,3),covM=sigma,disFam = poisson())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.