Microsimulation API
Functions
R Namespace Reference

Functions

double rnormPos (double mean, double sd)
 rnorm function constrained to be positive. This uses brute-force re-sampling rather than conditioning on the distribution function. More...
 
double rllogis (double shape, double scale)
 rllogis function for a random covariate from a log-logistic distribution with shape and scale. S(t) = 1/(1+(t/scale)^shape). More...
 
double rllogis_trunc (double shape, double scale, double left)
 rllogis_trunc function for a random covariate from a log-logistic distribution with shape and scale with minimum time left. S(t|t>x)=S(t)/S(x) where S(t)=1/(1+(t/scale)^shape). More...
 

Function Documentation

◆ rllogis()

double R::rllogis ( double  shape,
double  scale 
)

rllogis function for a random covariate from a log-logistic distribution with shape and scale. S(t) = 1/(1+(t/scale)^shape).

Definition at line 113 of file microsimulation.cc.

◆ rllogis_trunc()

double R::rllogis_trunc ( double  shape,
double  scale,
double  left 
)

rllogis_trunc function for a random covariate from a log-logistic distribution with shape and scale with minimum time left. S(t|t>x)=S(t)/S(x) where S(t)=1/(1+(t/scale)^shape).

Definition at line 118 of file microsimulation.cc.

◆ rnormPos()

double R::rnormPos ( double  mean,
double  sd 
)

rnorm function constrained to be positive. This uses brute-force re-sampling rather than conditioning on the distribution function.

Definition at line 107 of file microsimulation.cc.