Last chance! 50% off unlimited learning
Sale ends in
skellam(lmu1="loge", lmu2="loge", emu1=list(), emu2=list(),
imu1=NULL, imu2=NULL, nsimEIM=100, parallel=FALSE, zero=NULL)
Links
for more choices and for general information.Links
for more choices and for general information.CommonVGAMffArguments
for more information.
If convergence failure occurs (this CommonVGAMffArguments
for more information.
In particular, setting parallel=TRUE
will constrain the
two means to be equal."vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
and vgam
.The mean is $\mu_1 - \mu_2$ (returned as the fitted values) and the variance is $\mu_1 + \mu_2$. Simulated Fisher scoring is implemented.
dskellam
,
dpois
,
poissonff
.sdata = data.frame(x = runif(nn <- 1000))
sdata = transform(sdata, mu1 = exp(1+x), mu2 = exp(1+x))
sdata = transform(sdata, y = rskellam(nn, mu1, mu2))
fit1 = vglm(y ~ x, skellam, sdata, trace=TRUE)
fit2 = vglm(y ~ x, skellam(parallel=TRUE), sdata, trace=TRUE, crit="c")
coef(fit1, matrix=TRUE)
coef(fit2, matrix=TRUE)
summary(fit1)
# Likelihood ratio test for equal means:
pchisq(2*(logLik(fit1)-logLik(fit2)),
df=fit2@df.residual-fit1@df.residual, lower.tail=FALSE)
Run the code above in your browser using DataLab