exp_flexpredict: Conditional mean for Exponential distribution

Description Usage Arguments Details

View source: R/exp_predict.R

Description

exp_flexpredict returns the conditional mean E(Y|X) of a model fitted via the function exp_flexfit; where λ has been specified to be a function of covariates the required value should be specified using the ‘features’ parameter. exp_flexpredict also allows for the correlation of estimated parameters via the Cholesky decomposition of the variance-covariance matrix.

Usage

1
exp_flexpredict(model, features, draws = 5)

Arguments

model

An object of class "mle2" produced using the function exp_flexfit.

features

A numeric vector specifying the value of covriates at which the conditional mean should be evaluated; the covariates in the vector should appear in the same order as they do in the model. Where a model does not depend on covariates the argument may be left blank.

draws

The number of random draws from multivariate random normal representing correlated parameters. If parameter correlation is not required draws should be set to zero.

Details

This function uses the most common parametrization of the Exponential distribution. The probability probability density function is used is:

f(y) = λexp(-λy)

The function returns:

E(Y|X) = λ^-1

λ may be a function of covariates; in which case, the canonical log link function is used.


Shakeel95/bioFlex documentation built on March 3, 2020, 11:27 a.m.