View source: R/compare_waves.R
| compare_waves | R Documentation |
Compute overlap-aware inference for the change in a repeated organizational metric between two workforce waves, using linked stayers, a reliability assumption, or Cauchy-based bounds.
compare_waves(
data,
wave_0,
wave_1,
id_col,
wave_col,
metric_col,
method = c("auto", "linked", "reliability", "bounds"),
reliability = NULL,
sigma2 = NULL,
sigma2S = NULL,
cov_sign = c("unrestricted", "nonnegative"),
overlap_mode = c("generic", "overlap_aware"),
level = 0.95,
...
)
data |
Data frame with at least id, wave, and metric columns. |
wave_0 |
Value in |
wave_1 |
Value in |
id_col |
Column name for the employee identifier. |
wave_col |
Column name for the wave identifier. |
metric_col |
Column name for the metric. |
method |
Method to use: "auto", "linked", "reliability", or "bounds".
In "auto" mode, |
reliability |
Same-person cross-wave reliability for the relevant stayer population (used only for the reliability method). |
sigma2 |
Optional common individual-level variance. When supplied with the reliability method, overrides the pooled variance from the two waves. |
sigma2S |
Optional pooled individual-level stayer variance. When
supplied with the reliability method, is treated as a candidate |
cov_sign |
Covariance sign restriction for bounds: "unrestricted" or "nonnegative". |
overlap_mode |
Whether to use generic Cauchy bounds ("generic") or overlap-aware tightening ("overlap_aware"). |
level |
Confidence level for intervals (point-estimate methods) or sensitivity envelopes (bounded results). |
... |
Reserved for future extensions. |
A "wavecov_result" object (linked or reliability) or a
"wavecov_bounds_result" object (bounds). Use print(), tidy(),
and confint() for summaries.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.