Description Usage Arguments Details References
lnorm_flexprob returns the conditional probability P(Y<k | X) of a model fitted via the function lnorm_flexfit; where μ has been specified to be a function of covariates the required value should be specified using the ‘features’ parameter. The function includes a procedure for visualizing the conditional probability. lnorm_flexprob also allows for the correlation of estimated parameters via the Cholesky decomposition of the variance-covariance matrix.
1 | lnorm_flexprob(K, model, features, visualise = TRUE, xlim, draws = 5)
|
K |
Value for which P(Y<k | X) is computed. |
model |
An object of class "mle2" produced using the function lnorm_flexfit. |
features |
A numeric vector specifying the value of covriates at which the conditional probability 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. |
visualise |
Logical. If TRUE (the default) the conditional distribution is plotted at P(Y<k | x) is shaded. |
xlim |
Numeric vectors of length 2, giving the coordinate range of the dependent variable. |
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. |
This function uses the two parameter parametrization of the Log-Normal distribution. The probability probability density function is used is:
f(y) = [yσ(2π)^1/2]^-1 exp(-log(y-μ)^2/(2σ^2))
The function returns:
P(Y<k | X) = 0.5+0.5erf[log(k-μ)/(√2σ)]
μ may be a function of covariates; in which case, the identity link function is used.
Faith Ginos, Brenda. "Parameter Estimation For The Lognormal Distribution." Brigham Young University Scholars Archive (2018): 1-111. Web. 10 Aug. 2018.
Kleiber, Christian, and Samuel Kotz. Statistical Size Distributions In Economics And Actuarial Sciences. pp. 107-147. John Wiley & Sons, 2003.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.