Description Usage Arguments Details Value Author(s) See Also Examples
This function plots the transition function of the estimated PSTR model.
1 2 |
obj |
an object of the class PSTR returned from some functions in the package. Note that the corresponding PSTR model must be estimated first. |
size |
the size of the circle. |
color |
the color of the circle. |
xlim |
a numeric vector of dimension 2 specifying the limits of x-axis. |
ylim |
a numeric vector of dimension 2 specifying the limits of y-axis. |
fill |
the color used to fill the area on the transition curve with observations, |
alpha |
a number controlling the transparency of the points and filled area, |
The funciton uses some functions in the ggplot2 package and aims to give a quick plot of the transtion function.
The user can customize the title, subtitle, caption, x and y labels, for details, read the help file for the labs
function in ggplot2.
A ggplot object. The user can plot it simply by print the object.
Yukai Yang, yukai.yang@statistik.uu.se
Functions which return an object of the class PSTR and can be input into this function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | pstr = NewPSTR(Hansen99, dep='inva', indep=4:20, indep_k=c('vala','debta','cfa','sales'),
tvars=c('vala'), iT=14) # create a new PSTR object
# estimate the PSTR model
pstr = EstPSTR(use=pstr, im=1, iq=1, useDelta=TRUE, par=c(.63,0), method='CG')
# plot the transition function
ret = plot_transition(pstr)
# plot by running
ret
ret = plot_transition(pstr, fill='blue', xlim=c(-2,20), color = "dodgerblue4", size = 2, alpha=.3)
ret
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.