Type: Package
Title: Robust Median-Based Bayesian Growth Curve Modeling
Version: 0.1.2
Description: Implements robust median-based Bayesian growth curve models that handle Missing Completely at Random (MCAR), Missing At Random (MAR), and Missing Not At Random (MNAR) missing-data mechanisms, and allow auxiliary variables. Models are fitted via 'rjags' (interface to 'JAGS') and summarized with 'coda'.
License: GPL-3
URL: https://github.com/DandanTang0/Romeb
BugReports: https://github.com/DandanTang0/Romeb/issues
Encoding: UTF-8
Depends: R (≥ 4.2)
Imports: rjags, coda, stats
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0)
VignetteBuilder: knitr
Config/testthat/edition: 3
SystemRequirements: JAGS
LazyData: true
LazyDataCompression: xz
Language: en-US
RoxygenNote: 7.3.3
NeedsCompilation: no
Packaged: 2025-11-12 06:27:14 UTC; lynn
Author: Dandan Tang ORCID iD [aut, cre], Xin Tong [aut]
Maintainer: Dandan Tang <tangdd20@gmail.com>
Repository: CRAN
Date/Publication: 2025-11-17 09:10:02 UTC

Romeb: Robust Median-Based Bayesian Growth Curve Modeling

Description

Implements robust median-based Bayesian growth-curve models that handle MCAR/MAR/MNAR missing-data mechanisms and complete data. Models are fitted via rjags/JAGS and summarized with coda.

Fits a median-based Bayesian growth curve model under MCAR, MAR, MNAR or complete-data assumptions. If K > 0 the first K columns in data are treated as auxiliary variables.

Usage

Romeb(
  Missing_Type,
  data,
  time,
  seed,
  K = 0,
  chain = 1,
  Niter = 6000,
  burnIn = 3000
)

Arguments

Missing_Type

Character; one of MNAR, MAR, MCAR, no missing.

data

Matrix or data frame containing outcome columns (and optionally auxiliary variables).

time

Numeric vector of measurement times (e.g., c(0,1,2,3)).

seed

Integer seed for reproducibility.

K

Integer; number of auxiliary variables (default 0).

chain

Integer; number of MCMC chains (default 1).

Niter

Integer; iterations per chain (default 6000).

burnIn

Integer; burn-in iterations (default 3000).

Value

An object of class RomebResult containing

quantiles

posterior means, SDs and quantiles

geweke

Geweke z-scores

credible_intervals

95% equal-tail credible intervals

hpd_intervals

95% highest posterior density intervals

samps_full

full coda::mcmc.list (including burn-in)

Author(s)

Maintainer: Dandan Tang tangdd20@gmail.com (ORCID)

Authors:

See Also

Useful links:

Examples

  set.seed(123)
  Y <- matrix(rnorm(300), 100, 3)
  fit <- Romeb("no missing", data = Y, time = c(0,1,2), seed = 123, K = 0,
               Niter = 6000, burnIn = 3000)
  print(fit)

Youth Attitudes toward Deviance (NYS, 1976–1980)

Description

A real data set from the 1976–1980 National Youth Survey of U.S. youth.

Usage

NYS

Format

A data frame with 1,725 rows and 7 variables:

age

Participant age (years)

gender

Gender (0 = female, 1 = male)

Atd1

Attitude toward social deviance, wave 1

Atd2

Attitude toward social deviance, wave 2

Atd3

Attitude toward social deviance, wave 3

Atd4

Attitude toward social deviance, wave 4

Atd5

Attitude toward social deviance, wave 5

Source

National Youth Survey, waves 1976–1980 (downloadable at https://www.icpsr.umich.edu/icpsrweb/ICPSR/series/88)


Bayesian Growth Curve Model for Complete Data, MCAR (Missing Completely at Random, and MAR (Missing at Random

Description

A character string containing the JAGS model specification for complete data (no missing values), MCAR, and MAR.

Usage

model

Format

A character string.


Bayesian Growth Curve Model for MNAR (Missing Not At Random)

Description

JAGS model definition for data with MNAR mechanism.

Usage

model_MNAR

Format

A character string.


Bayesian Growth-Curve Model for MNAR with Auxiliary Variable (k)

Description

JAGS model definition for MNAR mechanism with auxiliary variable k.

Usage

model_MNAR_k

Format

A character string.