| plot_transition | R Documentation |
This function plots the estimated transition function
g(q;\gamma,c) of a fitted PSTR model.
plot_transition(
obj,
size = 1.5,
color = "blue",
xlim = NULL,
ylim = NULL,
fill = NULL,
alpha = NULL
)
obj |
An object of class |
size |
Point size. |
color |
Point colour. |
xlim |
Optional numeric vector of length 2 specifying x-axis limits. |
ylim |
Optional numeric vector of length 2 specifying y-axis limits. |
fill |
Optional colour for highlighting the support of observed q. |
alpha |
Transparency level for points and shading. |
Observed transition values are displayed together with the fitted transition curve. For models with multiple switches, multiple curves are shown.
In addition to the exported function
plot_transition(obj = ...), the same functionality is
available as an R6 method via obj$plot_transition(...).
A ggplot2 object.
pstr <- NewPSTR(Hansen99, dep = "inva", indep = 4:20,
indep_k = c("vala","debta","cfa","sales"),
tvars = c("vala"), iT = 14)
pstr <- EstPSTR(use = pstr, im = 1, iq = 1,
useDelta = TRUE, par = c(.63,0), method = "CG")
# Exported function
plot_transition(pstr)
# R6 method
pstr$plot_transition()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.