rtllogis: Simulate from a Truncated Log-Logistic Distribution

View source: R/iclogcondist_simulation_dist.R

rtllogisR Documentation

Simulate from a Truncated Log-Logistic Distribution

Description

This function generates random samples from a truncated log-logistic distribution using an acceptance-rejection method.

Usage

rtllogis(n, shape = 1, scale = 1, upper_bound = Inf)

Arguments

n

An integer specifying the number of random samples to generate.

shape

A positive numeric value representing the shape parameter of the log-logistic distribution. Default is 1.

scale

A positive numeric value representing the scale parameter of the log-logistic distribution. Default is 1.

upper_bound

A positive numeric value indicating the upper truncation point. Default is Inf (no truncation).

Value

A numeric vector of n random samples from the truncated log-logistic distribution.

Examples

# Generate 10 random samples from a truncated log-logistic distribution
rtllogis(10, shape = 2, scale = 1, upper_bound = 5)


iclogcondist documentation built on April 4, 2025, 5:18 a.m.