Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fff

F Distribution Family Function


Description

Maximum likelihood estimation of the (2-parameter) F distribution.

Usage

fff(link = "loglink", idf1 = NULL, idf2 = NULL, nsimEIM = 100,
    imethod = 1, zero = NULL)

Arguments

link

Parameter link function for both parameters. See Links for more choices. The default keeps the parameters positive.

idf1, idf2

Numeric and positive. Initial value for the parameters. The default is to choose each value internally.

nsimEIM, zero

See CommonVGAMffArguments for more information.

imethod

Initialization method. Either the value 1 or 2. If both fail try setting values for idf1 and idf2.

Details

The F distribution is named after Fisher and has a density function that has two parameters, called df1 and df2 here. This function treats these degrees of freedom as positive reals rather than integers. The mean of the distribution is df2/(df2-2) provided df2>2, and its variance is 2*df2^2*(df1+df2-2)/ (df1*(df2-2)^2*(df2-4)) provided df2>4. The estimated mean is returned as the fitted values. Although the F distribution can be defined to accommodate a non-centrality parameter ncp, it is assumed zero here. Actually it shouldn't be too difficult to handle any known ncp; something to do in the short future.

Value

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm and vgam.

Warning

Numerical problems will occur when the estimates of the parameters are too low or too high.

Author(s)

T. W. Yee

References

Forbes, C., Evans, M., Hastings, N. and Peacock, B. (2011). Statistical Distributions, Hoboken, NJ, USA: John Wiley and Sons, Fourth edition.

See Also

Examples

## Not run: 
fdata <- data.frame(x2 = runif(nn <- 2000))
fdata <- transform(fdata, df1 = exp(2+0.5*x2),
                          df2 = exp(2-0.5*x2))
fdata <- transform(fdata, y   = rf(nn, df1, df2))
fit <- vglm(y  ~ x2, fff, data = fdata, trace = TRUE)
coef(fit, matrix = TRUE)

## End(Not run)

VGAM

Vector Generalized Linear and Additive Models

v1.1-5
GPL-3
Authors
Thomas Yee [aut, cre], Cleve Moler [ctb] (author of several LINPACK routines)
Initial release
2021-01-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.