Learn R Programming

LTFGRS (version 1.0.0)

tnorm_mixture_conditional: Title: Calculates mean and variance of mixture of two truncated normal distributions

Description

Title: Calculates mean and variance of mixture of two truncated normal distributions

Usage

tnorm_mixture_conditional(mu, var, lower, upper, K_i, K_pop)

Value

mean and variance of mixture distribution between two truncated normal distributions

Arguments

mu

Mean value of normal distribution.

var

Variance of normal distribution.

lower

Lower threshold (can be -Inf).

upper

Upper threshold (can be Inf).

K_i

(Stratified) cumulative incidence proportion for the individual.

K_pop

Population prevalence (cumulative incidence proportion).

Examples

Run this code
tnorm_mixture_conditional(mu = 0, var = 1, lower = -Inf, upper = Inf, K_i = 0, K_pop = 0.01)
tnorm_mixture_conditional(mu = 0, var = 1, lower = -Inf, upper = 2, K_i = .01, K_pop = 0.05)

Run the code above in your browser using DataLab