Learn R Programming

LNPar (version 1.1.3)

rLnormParMix: Random number simulation for a mixture of a lognormal and a Pareto r.v.

Description

This function simulates random numbers for a mixture of a lognormal and a Pareto r.v.

Usage

rLnormParMix(n, p, mu, sigma, xmin, alpha)

Value

n iid random numbers from the lognormal-Pareto distribution.

Arguments

n

positive integer: number of simulated random numbers.

p

scalar, 0 < p < 1: mixing weight.

mu

scalar: expected value of the lognormal distribution on the log scale.

sigma

positive scalar: standard deviation of the lognormal distribution on the log scale.

xmin

positive scalar: threshold.

alpha

non-negative scalar: Pareto shape parameter.

Examples

Run this code
ySim <- rLnormParMix(100,.5,0,1,4,1.5)

Run the code above in your browser using DataLab