Learn R Programming

LambertW (version 0.6.4)

LambertW_input_output-methods: Methods for Lambert W input and output objects

Description

S3 methods for Lambert W input and output objects (created by create_LambertW_input and create_LambertW_output).

plot.LambertW_input plots the theoretical (1) pdf and (2) cdf of the input \(X \sim F_X(x \mid \boldsymbol \beta)\).

plot.LambertW_output plots the theoretical (1) pdf and (2) cdf of the output RV \(Y \sim\) Lambert W \(\times\) \(F_X(x \mid \boldsymbol \beta)\). It overlays the plot with the pdf and cdf of the input RV \(X \sim F_X(x \mid \boldsymbol \beta)\) (setting \(\gamma = \delta = 0, \alpha = 1\)).

print.LambertW_input prints an overview of the input object.

print.LambertW_output prints an overview of the output object.

Usage

# S3 method for LambertW_input
plot(x, xlim = NULL, ...)

# S3 method for LambertW_output plot(x, xlim = NULL, ...)

# S3 method for LambertW_input print(x, ...)

# S3 method for LambertW_output print(x, ...)

Arguments

x

object of class LambertW_input or LambertW_output.

xlim

lower and upper limit of x-axis for cdf and pdf plots. If NULL, it tries to determine good limits based on the family type of the distribution and the quantiles. Most of the times it will show the pdf and cdf from the 0.5% to 99.5% quantile.

further arguments passed to or from other methods.

Examples

Run this code
# NOT RUN {
# create a Normal(1, 2) input
Gauss.input <- create_LambertW_input("normal", beta = c(1, 2))
plot(Gauss.input)
# make it a bit heavy tailed (beta in theta comes from Gauss.input)
LW.Gauss <- create_LambertW_output(LambertW.input = Gauss.input, 
                                   theta = list(delta = c(0.3)))
LW.Gauss  # print a nice overview in the console
plot(LW.Gauss)

# draw random sample
LW.Gauss$r(n=10)
Gauss.input$r(n=10)
# quantiles
LW.Gauss$q(p=0.6)
Gauss.input$q(p=0.6)

# }

Run the code above in your browser using DataLab