condlSample: Generate samples from conditional distribution.

Description Usage Arguments Value Methods (by class)

Description

Generate samples from conditional distribution.

Generate samples from a conditional distribution obtained from a model prediction

Generate samples from a conditional distribution obtained from a model prediction

Usage

1
2
3
4
5
6
7
8
9
condlSample(object, ...)

## S3 method for class 'rcgam'
condlSample(object, newdata, flowcol = "flow",
  flow.units = "ft3/s", quantile, ...)

## S3 method for class 'rclm'
condlSample(object, newdata, flowcol = "flow",
  flow.units = "ft3/s", quantile, ...)

Arguments

object

a model object with a 'predict()' method

...

arguments to be passed to individual methods. These should always include : 'newdata' - to be passed to 'predict()' function ‘quantile' - either ’random' for stochastic sampling from conditional distribution or a numeric value on (0, 1) specifying the quantile to return

newdata

a data.frame containing precictor variables to use for prediction

object

An rclm or rcgam object to use for predicting

retransform

Should the predictions be returned as concentrations? (defaults to TRUE)

...

Arguments passed to 'predict.lm' or predict.gam function call

smear

Use Smearing estimator to correct transformation bias?

object

An rclm or rcgam object to use for predicting

newdata

a data.frame containing precictor variables to use for prediction

retransform

Should the predictions be returned as concentrations? (defaults to TRUE)

...

Arguments passed to 'predict.lm' or predict.gam function call

smear

Use Smearing estimator to correct transformation bias?

Value

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

Methods (by class)


markwh/condSample documentation built on May 21, 2019, 12:25 p.m.