Learn R Programming

powerbrmsINLA (version 1.3.0)

validate_sd_spec: Validate an SD Specification for error_sd or group_sd

Description

Checks whether the input is a valid positive numeric scalar or one of the supported distributional list specifications. Called automatically by brms_inla_power() before the simulation loop; can also be called directly for interactive validation.

Usage

validate_sd_spec(x, arg_name = "x")

Value

x, invisibly. Called for its side effects (stopping on invalid input).

Arguments

x

A positive numeric scalar or a named list with element dist.

arg_name

Character string used in error messages (default "x").

Details

Supported distributional formats:

  • list(dist = "halfnormal", sd = X, location = Y) — draws |Normal(location, sd)|; location defaults to 0.

  • list(dist = "lognormal", meanlog = X, sdlog = Y) — draws from a log-normal distribution.

  • list(dist = "uniform", min = X, max = Y) — draws from Uniform(min, max); requires min >= 0.