Continuous-value distribution over a cohort, in one call
Source:R/analysis.R
ds.omop.distribution.RdThin wrapper over ds.omop.analysis.run for the catalog's
continuous-covariate analysis ("dsomop:fe.continuous"): per-covariate
count and avg/sd/median/p10-p90 over a scoped cohort (measurement values, age,
or time-in-cohort). It builds the params and delegates, inheriting scoping,
pooling, optional plotting, and the ONE disclosure gate (which strips min/max
and masks sub-threshold stats) unchanged.
Usage
ds.omop.distribution(
cohort = NULL,
metric = "measurement_value",
domain = "measurement",
top_n = 50,
concept_id = NULL,
tables = NULL,
plot = FALSE,
symbol = "omop",
conns = NULL
)Arguments
- cohort
Cohort reference to scope to (handle,
cohort_definition_id, or server-side table name). Required unlesstablesis given.- metric
Character;
"measurement_value"(default),"age", or"time_in_cohort".- domain
Character; value domain for
metric = "measurement_value"by name ("measurement"/"observation") or code ("3"/"4"). Default"measurement".- top_n
Integer; number of top covariates to return (default 50).
- concept_id
Integer vector or
NULL; narrow the gated result to these covariate concept id(s) (post-gate row subset). DefaultNULL.- tables
Optional character vector of
omop.tablesymbol names to scope to; may be combined withcohort.- plot
Logical; build the entry's client-side plot (default
FALSE).- symbol
Character; the session symbol (default
"omop").- conns
DSI connection object(s) or
NULLto use the session default.
Value
A dsomop_result (see ds.omop.analysis.run).
Details
As with ds.omop.prevalence, the cohort IS the population, so a
cohort/tables scope is required; an un-scoped call errors clearly.