optimized.run {ZIGP} | R Documentation |
'optimized.run' calculates valid initial values for the 'optim' method.
optimized.run(Y, X, W, Z)
Y |
response vector of length n. |
X |
design matrix of dim (n x p) for mean modelling. |
W |
design matrix of dim (n x r) for overdispersion modelling. |
Z |
design matrix of dim (n x q) for zero inflation modelling. |
t.i has to be defined as the exposure. n has to be defined as the number of observations dim(X)[1].
Y <- c(3,0,2) X <- matrix(c(1:3,4,3,5),3,2) W <- c(3,-4,-1) Z <- rep(1,3) n <- dim(X)[1] t.i <<- rep(1,n) optimized.run(Y,X,W,Z) #[1] X1 X2 W Z #[2] -0.6783368 0.4559966 0.1238029 -1.3862944