uninormal {VGAM} | R Documentation

## Univariate Normal Distribution

### Description

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

### Usage

    uninormal(lmean = "identitylink", lsd = "loge", lvar = "loge",
              var.arg = FALSE, imethod = 1, isd = NULL, parallel = FALSE,
              smallno = 1e-05, zero = "sd")

### Arguments

`lmean, lsd, lvar` | Link functions applied to the mean and standard deviation/variance. See `Links` for more choices. Being positive quantities, a log link is the default for the standard deviation and variance (see `var.arg`).

`var.arg` | Logical. If `TRUE` then the second parameter is the variance and `lsd` and `esd` are ignored, else the standard deviation is used and `lvar` and `evar` are ignored.
`smallno` | Numeric, positive but close to 0. Used specifically for quasi-variances; if the link for the mean is `explink` then any non-positive value of `eta` is replaced by this quantity (hopefully, temporarily and only during early iterations).
`imethod, parallel, isd, zero` | See `CommonVGAMffArguments` for more information. If `lmean = loge` then try `imethod = 2`. If `parallel = TRUE` then the parallelism constraint is not applied to the intercept.

### 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`.

### Warning

`uninormal()` is the new name; `normal1()` is old and will be decommissioned soon.

### Note

Yet to do: allow an argument such as `eq.sd` that enables the standard devations to be the same.

### 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

`gaussianff`, `posnormal`, `mix2normal`, `normal.vcm`, `Qvar`, `tobit`, `cens.normal`, `foldnormal`, `skewnormal`, `double.cens.normal`, `SURff`, `AR1`, `huber2`, `studentt`, `binormal`, `dnorm`, `simulate.vlm`, `hdeff.vglm`.

### Examples

    udata <- data.frame(x2 = rnorm(nn <- 200))
    udata <- transform(udata,
                       y1  = rnorm(nn, m = 1 - 3*x2, sd = exp(1 + 0.2*x2)),
                       y2a = rnorm(nn, m = 1 + 2*x2, sd = exp(1 + 2.0*x2)^0.5),
                       y2b = rnorm(nn, m = 1 + 2*x2, sd = exp(1 + 2.0*x2)^0.5))
    fit1 <- vglm(y1 ~ x2, uninormal(zero = NULL), data = udata, trace = TRUE)
    coef(fit1, matrix = TRUE)
    fit2 <- vglm(cbind(y2a, y2b) ~ x2, data = udata, trace = TRUE,
                 uninormal(var = TRUE, parallel = TRUE ~ x2,
                           zero = NULL))
    coef(fit2, matrix = TRUE)

    # Generate data from N(mu = theta = 10, sigma = theta) and estimate theta.
    theta <- 10
    udata <- data.frame(y3 = rnorm(100, m = theta, sd = theta))
    fit3a <- vglm(y3 ~ 1, uninormal(lsd = "identitylink"), data = udata,
                 constraints = list("(Intercept)" = rbind(1, 1)))
    fit3b <- vglm(y3 ~ 1, uninormal(lsd = "identitylink", parallel = TRUE ~ 1,
                                    zero = NULL), data = udata)
    coef(fit3a, matrix = TRUE)
    coef(fit3b, matrix = TRUE)  # Same as fit3a

[Package VGAM version 1.0-4 Index]