Utilities for benchmarking ratio model fitting performance across different dataset sizes and configurations.
Fits a model on simulated data and reports timing and performance metrics.
Usage
ratiod_benchmark(
N = 500,
p = 3,
n_groups = 0,
family = ratiod_negbin_negbin(),
n_iter = 1000,
n_warmup = 500,
n_chains = 1,
n_threads = 1,
verbose = FALSE
)
# S3 method for class 'ratiod_benchmark'
print(x, ...)Arguments
- N
Number of observations
- p
Number of predictors
- n_groups
Number of random effect groups (0 for none)
- family
Model family (default: ratiod_negbin_negbin())
- n_iter
Total iterations
- n_warmup
Warmup iterations
- n_chains
Number of chains
- n_threads
Number of threads per chain
- verbose
Print progress (default: FALSE)
- x
A ratiod_benchmark object
- ...
Ignored
Examples
# \donttest{
# Quick benchmark
bench <- ratiod_benchmark(N = 100, p = 3, n_iter = 200, n_warmup = 100)
print(bench)
#> tulpaRatio Benchmark Results
#> =======================
#>
#> Configuration:
#> Observations: 100
#> Predictors: 3
#> RE groups: 0
#> Parameters: 8
#> Iterations: 200 (100 warmup)
#> Chains: 1
#> Threads: 1
#>
#> Timing:
#> Total time: 0.0 seconds
#> Samples/sec: 6829.1
#> Iter/sec: 13658.2
#>
#> Diagnostics:
#> Divergent: 0 (0.00%)
# }