Learn R Programming

VGAM (version 1.1-12)

N1pois: Linear Model and Poisson Mixed Data Type Distribution

Description

Density, and random generation for the (four parameter bivariate) Linear Model--Poisson copula distribution.

Usage

dN1pois(x1, x2, mean = 0, sd = 1, lambda, apar = 0,
        doff = 5, copula = "gaussian", log = FALSE)
rN1pois(n, mean = 0, sd = 1, lambda, apar = 0,
        doff = 5, copula = "gaussian")

Value

dN1pois gives the probability density/mass function,

rN1pois generates random deviate and returns a two-column matrix.

Arguments

x1, x2

vector of quantiles. The valid values of x2 are nonnegative integers.

n

number of observations. Same as rnorm.

copula

See N1poisson.

mean, sd, lambda, apar

See N1poisson.

doff

See N1poisson.

log

Logical. If TRUE then the logarithm is returned.

Author

T. W. Yee

Details

See N1poisson, the VGAM family functions for estimating the parameter by maximum likelihood estimation, for details.

See Also

N1poisson, rnorm, rpois.

Examples

Run this code
if (FALSE) { 
nn <- 1000; mymu <- 1; sdev <- exp(1)
apar <- rhobitlink(0.4, inverse = TRUE)
lambda <- loglink(1, inverse = TRUE)
mat <- rN1pois(nn, mymu, sdev, lambda, apar)
pndata <- data.frame(y1 = mat[, 1], y2 = mat[, 2])
with(pndata, plot(jitter(y1), jitter(y2), col = 4))
}

Run the code above in your browser using DataLab