0

I am confused with the following:

I found the next examples in a website https://stats.oarc.ucla.edu/r/dae/zero-truncated-negative-binomial/

library(foreign)
dat <- read.dta("https://stats.idre.ucla.edu/stat/data/ztp.dta")

dat <- within(dat, { hmo <- factor(hmo) died <- factor(died) })

summary(dat) library(VGAM) m1 <- vglm(stay ~ age + hmo + died, family = posnegbinomial(), data = dat) summary(m1)

m2 <- glm(stay ~ age + hmo + died, family = gaussian(), data = dat) summary(m2)

Why in model 1 m1 the summary comes with a z value and in the glm with familiy gaussian the summary comes with t value??

I have seen in other examples that the first one always gives the z value in the third column and in the model 2 m2 the summary comes with t value.

Boris
  • 993
  • Hint: run m2, but with a poisson family. And check ?summary.glm and ?VGAM::summaryvglm – Alex J Jun 06 '23 at 22:36
  • I have checked that, If I consider the poisson family I got also the z value in the summary. – Boris Jun 07 '23 at 08:27
  • I checked the help for both functions: It says t ratio, if the dispersion is estimated. z ratio if the dispersion is known. I am not really clear about it. If I assume the poisson family I have need to estimate the mean and the standard deviation that coincides. But z value if that is known? I am not sure know if I know or not the standard deviation. The formula for t ratio is beta-beta_estimated/SE(beta) and the z value is x-mu/sigma But, I have both values ? – Boris Jun 07 '23 at 08:30
  • Why It is not possible to consider the z value if the family is Poisson? – Boris Jun 07 '23 at 08:31
  • I am a bit confused with what is the dispersion in this case? why in one case this is estimated and in the other case this is known? it is not supposed that always I am estimating the dispersion given by the standard deviation?? – Boris Jun 07 '23 at 08:37
  • For glm with Gaussian, the dispersion (residual variance) is estimated. So according to its documentation, it's t. For glm with Poisson, the dispersion is assumed to be 1, so according to its documentation, it's t. For anything from VGAM, it "is labelled z value regardless of whether the dispersion is estimated or known" – Alex J Jun 07 '23 at 23:16
  • See https://stats.stackexchange.com/questions/56066/wald-test-in-regression-ols-and-glms-t-vs-z-distribution for a similar question, but maybe nit a duplicate – kjetil b halvorsen Sep 07 '23 at 16:26

0 Answers0