Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/family.univariate.R

Estimating the parameters of a Student t distribution.

1 2 3 4 5 6 | ```
studentt (ldf = "loglog", idf = NULL, tol1 = 0.1, imethod = 1)
studentt2(df = Inf, llocation = "identitylink", lscale = "loge",
ilocation = NULL, iscale = NULL, imethod = 1, zero = "scale")
studentt3(llocation = "identitylink", lscale = "loge", ldf = "loglog",
ilocation = NULL, iscale = NULL, idf = NULL,
imethod = 1, zero = c("scale", "df"))
``` |

`llocation, lscale, ldf` |
Parameter link functions for each parameter,
e.g., for degrees of freedom |

`ilocation, iscale, idf` |
Optional initial values. If given, the values must be in range. The default is to compute an initial value internally. |

`tol1` |
A positive value, the tolerance for testing whether an initial value is 1. Best to leave this argument alone. |

`df` |
Numeric, user-specified degrees of freedom. It may be of length equal to the number of columns of a response matrix. |

`imethod, zero` |
See |

The Student t density function is

*
f(y;nu) = (gamma((nu+1)/2) / (sqrt(nu*pi) gamma(nu/2))) *
(1 + y^2 / nu)^{-(nu+1)/2}*

for all real *y*.
Then *E(Y)=0* if *nu>1* (returned as the fitted values),
and *Var(Y)= nu/(nu-2)*
for *nu > 2*.
When *nu=1* then the Student *t*-distribution
corresponds to the standard Cauchy distribution,
`cauchy1`

.
When *nu=2* with a scale parameter of `sqrt(2)`

then
the Student *t*-distribution
corresponds to the standard (Koenker) distribution,
`sc.studentt2`

.
The degrees of freedom can be treated as a parameter to be estimated,
and as a real and not an integer.
The Student t distribution is used for a variety of reasons
in statistics, including robust regression.

Let *Y = (T - mu) / sigma* where
*mu* and *sigma* are the location
and scale parameters respectively.
Then `studentt3`

estimates the location, scale and
degrees of freedom parameters.
And `studentt2`

estimates the location, scale parameters
for a user-specified degrees of freedom, `df`

.
And `studentt`

estimates the degrees of freedom parameter only.
The fitted values are the location parameters.
By default the linear/additive predictors are
*(mu, log(sigma), log log(nu))^T*
or subsets thereof.

In general convergence can be slow, especially when there are covariates.

An object of class `"vglmff"`

(see `vglmff-class`

).
The object is used by modelling functions such as `vglm`

,
and `vgam`

.

`studentt3()`

and `studentt2()`

can handle multiple responses.

Practical experience has shown reasonably good initial values are
required. If convergence failure occurs try using arguments
such as `idf`

.
Local solutions are also possible, especially when
the degrees of freedom is close to unity or
the scale parameter is close to zero.

A standard normal distribution corresponds to a *t* distribution
with infinite degrees of freedom. Consequently, if the data is close
to normal, there may be convergence problems; best to use
`uninormal`

instead.

T. W. Yee

Student (1908)
The probable error of a mean.
*Biometrika*, **6**, 1–25.

Zhu, D. and Galbraith, J. W. (2010)
A generalized asymmetric Student-*t* distribution with
application to financial econometrics.
*Journal of Econometrics*, **157**, 297–305.

`uninormal`

,
`cauchy1`

,
`logistic`

,
`huber2`

,
`sc.studentt2`

,
`TDist`

,
`simulate.vlm`

.

1 2 3 4 5 6 7 8 9 10 11 | ```
tdata <- data.frame(x2 = runif(nn <- 1000))
tdata <- transform(tdata, y1 = rt(nn, df = exp(exp(0.5 - x2))),
y2 = rt(nn, df = exp(exp(0.5 - x2))))
fit1 <- vglm(y1 ~ x2, studentt, data = tdata, trace = TRUE)
coef(fit1, matrix = TRUE)
fit2 <- vglm(y1 ~ x2, studentt2(df = exp(exp(0.5))), data = tdata)
coef(fit2, matrix = TRUE) # df inputted into studentt2() not quite right
fit3 <- vglm(cbind(y1, y2) ~ x2, studentt3, data = tdata, trace = TRUE)
coef(fit3, matrix = TRUE)
``` |

VGAM documentation built on May 19, 2017, 10:21 a.m.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.