Learn R Programming

VGAM (version 0.7-5)

normal1: 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(), zero=NULL)

Arguments

lmean
Link function applied to the mean. See Links for more choices.
lsd
Parameter link function applied to the standard deviation. See Links for more choices. Being a positive quantity, a log link is the default.
emean, esd
List. Extra argument for the links. See earg in Links for general information.
zero
An integer vector, containing the value 1 or 2. If so, the mean or standard deviation respectively are modelled as an intercept only. Usually, setting zero=2 will be used, if used at all. The default value NULL means both l

Value

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

Details

By default, the mean is the first linear/additive predictor and the log of the standard deviation is the second linear/additive predictor. The Fisher information matrix is diagonal.

References

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

See Also

gaussianff, posnormal1, mix2normal1, tobit, cnormal1, fnormal1, skewnormal1, dcnormal1, studentt, dnorm.

Examples

Run this code
n = 200
x = rnorm(n)
y = rnorm(n, mean=1-3*x, sd=exp(1+0.2*x))
fit = vglm(y ~ x, normal1)
coef(fit, matrix=TRUE)

# Generate a random sample from a N(mu=theta, sigma=theta)
# distribution with theta=10. Then estimate theta.
theta = 10
y = rnorm(100, m=theta, sd=theta)
fit = vglm(y ~ 1, normal1(lsd="identity"),
           constraints=list("(Intercept)"=rbind(1,1)))
coef(fit, matrix=TRUE)

Run the code above in your browser using DataLab