normal1 {VGAM}R Documentation

Univariate Normal Distribution

Description

Maximum likelihood estimation of the two parameters of a univariate normal distribution.

Usage

normal1(lmean = "identity", lsd = "loge",
        emean = list(), esd = list(), imethod = 1, zero = -2)

Arguments

lmean, lsd

Link functions applied to the mean and standard deviation. See Links for more choices. Being a positive quantity, a log link is the default for the standard deviation.

emean, esd

List. Extra argument for the links. See earg in Links for general information.

imethod, zero

See CommonVGAMffArguments for more information. If lmean = loge then try imethod = 2.

Details

This fits a linear model (LM) as the first linear/additive predictor. So, by default, this is just the mean. By default, the log of the standard deviation is the second linear/additive predictor. The Fisher information matrix is diagonal. This VGAM family function can handle multiple responses.

Value

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

Note

Yet to do: allow an argument such as sameSD that enables the standard devations to be the same. And a parallel argument.

Author(s)

T. W. Yee

References

Evans, M., Hastings, N. and Peacock, B. (2000) Statistical Distributions, New York: Wiley-Interscience, Third edition.

See Also

gaussianff, posnormal1, mix2normal1, Qvar, tobit, cennormal1, fnormal1, skewnormal1, dcennormal1, huber, studentt, binormal, dnorm.

Examples

ndata <- data.frame(x2 = rnorm(nn <- 200))
ndata <- transform(ndata, y = rnorm(nn, mean = 1-3*x2, sd = exp(1+0.2*x2)))
fit <- vglm(y ~ x2, normal1(zero = NULL), ndata, trace = TRUE)
coef(fit, matrix = TRUE)

# Generate data from N(mu = theta = 10, sigma = theta) and estimate theta.
theta <- 10
ndata <- data.frame(y = rnorm(100, m = theta, sd = theta))
fit <- vglm(y ~ 1, normal1(lsd = "identity"), ndata,
            constraints = list("(Intercept)" = rbind(1, 1)))
coef(fit, matrix = TRUE)

[Package VGAM version 0.8-4 Index]