R code implementation of a skew-normal copula-driven generalized linear mixed model (GLMM)
Start with the main.R
script and read the inline documentations.
- There is a universal
xi
for all units, thus one a universalSigma
and also onePsi
. - All units have the same number of observations, that is only
obs
, which is not indexed asobs[i]
. - There is a single skewness vector
lambda
for all units, which is the same size as the number of observations. That also implies a one$\delta$ vector. - In the
random.data.R
file, rather then generating multiple skew-normalsZ
's, one for each unit, we generate one$Z$ , withE[Z]= 0 + delta*sqrt(pi/2)
, whereOmega = Sigma
andalpha = lambda
in thesn
R
library. - Given that there is one
Z
, we haveZ[i] = Z + b_o[i]
for each unit.