Learn R Programming

VGAM (version 0.7-1)

normal1: Univariate normal distribution

Description

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

Usage

normal1(lmean="identity", lsd="loge", zero=NULL)

Arguments

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, tobit, cnormal1, dcnormal1, studentt.

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