betapr_flexpredict: Conditional mean for Beta Prime distribution

Description Usage Arguments Details References

View source: R/betapr_predict.R

Description

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

Usage

1
betapr_flexpredict(model, features, draws = 5)

Arguments

model

An object of class "mle2" produced using the function betapr_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 two parameter parametrization of the Beta Prime distribution is used in Johnson and Kotz (1995). The tow parameter distribution ins a special case of the three parameter distribution, with σ = 1. The probability probability density function is used is:

f(y) = [y^α-1 (1+y)^-(α+β)]/Β(α,β)

The function returns:

E(Y|X) = α/(β-1)

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

References

Johnson, N.L., Kotz, S., Balakrishnan, N. (1995). Continuous Univariate Distributions, Volume 2 (2nd Edition), Wiley.


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