predict_binomial function

Simulate Binary Values

Simulate Binary Values

This internal function simulates covariate values from a binomial distribution.

predict_binomial(x, size, prob)

Arguments

  • x: Integer specifying the number of observations to be simulated.
  • size: Integer specifying the number of trials.
  • prob: Numeric vector specifying the probabilities.

Returns

Numeric vector of simulated covariate values under the binomial distribution.