predict_trunc_normal: Simulate Truncated Normal Values

View source: R/simulate.R

predict_trunc_normalR Documentation

Simulate Truncated Normal Values

Description

This internal function simulates covariate values from a normal distribution truncated on one side.

Usage

predict_trunc_normal(x, mean, est_sd, a, b)

Arguments

x

Integer specifying the number of observations to be simulated.

mean

Numeric scalar specifying the mean of the distribution.

est_sd

Numeric scalar specifying the standard deviation of the distribution.

a

Numeric scalar specifying the lower bound of truncation.

b

Numeric scalar specifying the upper bound of truncation.

Value

Numeric vector of simulated covariate values under the truncated normal distribution.


CausalInference/gfoRmula documentation built on Oct. 1, 2024, 8:36 p.m.