Learn R Programming

UnivRNG (version 1.2.3)

draw.pareto: Generates variates from Pareto distribution

Description

This function implements pseudo-random number generation for a Pareto distribution with pdf

$$f(x|\alpha,\beta)=\frac{ab^{a}}{x^{a+1}}$$

for \(0 < b \leq x < \infty\) and \(a>0\) where \(a\) and \(b\) are the shape and location parameters, respectively.

Usage

draw.pareto(nrep,shape,location)

Arguments

nrep

Number of data points to generate.

shape

Shape parameter of the desired Pareto distribution.

location

Location parameter of the desired Pareto distribution.

Value

A list of length five containing generated data, the theoretical mean, the empirical mean, the theoretical variance, and the empirical variance with names y, theo.mean, emp.mean, theo.var, and emp.var, respectively.

Examples

Run this code
# NOT RUN {
draw.pareto(nrep=100000,shape=11,location=11)

draw.pareto(nrep=100000,shape=8,location=10)
# }

Run the code above in your browser using DataLab