condlSample.lm: Generate samples from conditional distribution defined by a...

Description Usage Arguments Value

View source: R/condlSample.R

Description

Generate samples from conditional distribution defined by a (generalized) linear model.

Usage

1
2
## S3 method for class 'lm'
condlSample(object, newdata, quantile = "random")

Arguments

object

a lm object (including glm and gam). If a glm/gam, its family must be gaussian, binomial, poisson, or gamma.

newdata

As in predict.lm, predict.glm, etc. An optional data.frame to use for generating conditional distribution parameters. If omitted, the fitted values are used.

quantile

vector of quantiles to which the returned values will correspond. If the default, 'random' is not used, this must be numeric on (0, 1).

Value

Numeric vector containing conditional random sample (if ‘quantile = ’random'') or conditional quantiles from condition distribution defined by 'object' and 'newdata'


markwh/conditionalSample documentation built on May 21, 2019, 12:26 p.m.