id_sim_resid: Residual function for checking estimated samples compared to...

View source: R/Simulate.R

id_sim_residR Documentation

Residual function for checking estimated samples compared to true simulation scores Returns a data frame with residuals plus quantiles.

Description

Residual function for checking estimated samples compared to true simulation scores Returns a data frame with residuals plus quantiles.

Usage

id_sim_resid(obj, rep = 1)

Arguments

obj

A fitted idealstan object with true data from id_sim_gen()

rep

Over how many replicates to calculate residuals? Currently can only be 1

Value

A named list of tibble objects, one per parameter type (Ideal Points, Absence Discrimination, Item Discrimination), each with columns avg, high, low, Params, est_type, and iter summarising posterior residuals relative to true parameter values.

Examples


sim <- id_sim_gen()
est <- id_estimate(sim, model_type=1, fixtype='vb_full',
                   use_method="pathfinder", nchains=2, ncores=2)
id_sim_resid(est)


idealstan documentation built on May 13, 2026, 1:08 a.m.