Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VGAM package does not appear to compute CI for N? Problems with weights #2

Open
cschwarz-stat-sfu-ca opened this issue Apr 24, 2023 · 1 comment

Comments

@cschwarz-stat-sfu-ca
Copy link
Owner

Try the following code fragment
data_rodli <- data.frame(cap_hist=c("11""10","01"),
t1 = c(1,1,0),
t2 = c(1,0,1),
freq =c(57, 52, 120))

need to expand capture history by frequency

rodli.vgam.expand <- plyr::adply(rodli.vgam, 1, function(x){
x[ rep(1, x$freq),]
})

head(rodli.vgam.expand)

rodli.vgam.m.t <- vglm(cbind(t1,t2) ~ 1,
posbernoulli.t, data = rodli.vgam.expand)
summary(rodli.vgam.m.t)

try with weights

rodli.vgam.m.t2 <- vglm(cbind(t1,t2) ~ 1,
posbernoulli.t, data = rodli.vgam, weights=freq)
summary(rodli.vgam.m.t)

@cschwarz-stat-sfu-ca
Copy link
Owner Author

Wrote the maintainer of VGAM who has fixed the problem where the CI for N is not printed.
The weight problem is deeper in several packages and likely not fixable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant