profile_logliks: Plot profile log-likelihoods around the estimates

Description Usage Arguments Details Value References See Also Examples

View source: R/diagnosticPlot.R

Description

profile_logliks plots profile log-likelihoods around the estimates.

Usage

1
profile_logliks(gsmar, scale = 0.02, nrows, ncols, precision = 200)

Arguments

gsmar

a class 'gsmar' object, typically generated by fitGSMAR or GSMAR.

scale

a numeric scalar specifying the interval plotted for each estimate: the estimate plus-minus abs(scale*estimate).

nrows

how many rows should be in the plot-matrix? The default is max(ceiling(log2(nparams) - 1), 1).

ncols

how many columns should be in the plot-matrix? The default is ceiling(nparams/nrows). Note that nrows*ncols should not be smaller than the number of parameters.

precision

at how many points should each profile log-likelihood be evaluated at?

Details

The red vertical line points the estimate.

Be aware that the profile log-likelihood function is subject to a numerical error due to limited float-point precision when considering extremely large parameter values, say, overly large degrees freedom estimates.

Value

Only plots to a graphical device and doesn't return anything.

References

See Also

quantile_residual_plot, diagnostic_plot, cond_moment_plot, GSMAR, quantile_residual_tests, simulate.gsmar

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## The below examples the approximately 15 seconds to run.

# G-StMAR model with one GMAR type and one StMAR type regime
fit42gs <- fitGSMAR(M10Y1Y, p=4, M=c(1, 1), model="G-StMAR",
                    ncalls=1, seeds=4)
profile_logliks(fit42gs)

# GMAR model, graphs zoomed in closer.
fit12 <- fitGSMAR(data=simudata, p=1, M=2, model="GMAR", ncalls=1, seeds=1)
profile_logliks(fit12, scale=0.001)

uGMAR documentation built on Jan. 24, 2022, 5:10 p.m.