Learn R Programming

VGAMextra (version 0.0-1)

inv.chisq: Inverse Chi--squared Distribution.

Description

Maximum likelihood estimation of the degrees of freedom for an inverse chi--squared distribution using Fisher scoring.

Usage

inv.chisq(link = "loge", zero = NULL)

Arguments

link, zero

link is the link function applied to the degrees of freedom, leading to the unique linear predictor in this family function. By default, the link is loge.

zero allows to model the single linear predictor as intercept--only.

For further details, see CommonVGAMffArguments.

Value

An object of class "vglmff". See vglmff-class for further details.

Warning

By default, the single linear/additive predictor in this family function, say \(\eta = \log dof\), can be modeled in terms of covariates, i.e., zero = NULL. To model \(\eta\) as intercept--only set zero = "dof".

See zero for more details about this.

Details

The inverse chi--squared distribution with \(df = \nu \geq 0\) degrees of freedom implemented here has density

$$f(x; \nu) = \frac{ 2^{-\nu / 2} x^{-\nu/2 - 1} e^{-1 / (2x)} }{ \Gamma(\nu / 2) }, $$ where \(x > 0\), and \(\Gamma\) is the gamma function. The mean of \(Y\) is \(1 / (\nu - 2)\) (returned as the fitted values), provided \(\nu > 2\).

That is, while the expected information matrices used here are valid in all regions of the parameter space, the regularity conditions for maximum likelihood estimation are satisfied only if \(\nu > 2\). To enforce this condition, choose link = logoff(offset = -2).

As with, chisq, the degrees of freedom are treated as a parameter to be estimated using (by default) the link loge. However, the mean can also be modelled with this family function. See inv.chisqMeanlink for specific details about this.

This family VGAM function handles multiple responses.

See Also

loge, CommonVGAMffArguments, inv.chisqMeanlink, zero.

Examples

Run this code
# NOT RUN {
   set.seed(17010504)
   dof   <- 2.5 
   yy    <- rinv.chisq(100, df = dof)     
   ics.d <- data.frame(y = yy)             # The data.
 
   
   fit.inv <- vglm(cbind(y, y) ~ 1, family = inv.chisq, 
                   data = ics.d, trace = TRUE, crit = "coef")
   Coef(fit.inv) 
   summary(fit.inv)
    
# }

Run the code above in your browser using DataLab