analyseplot_shift: Estimate a single trajectory shift in the beta distribution...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/analyseplot_shift.R

Description

This function calculates and plots a single shift in the temporal evolution of the estimated parameters of beta distribution $\hat\alpha$ and $\hat\beta$

Usage

1
2
3
4
5
6
analyseplot_shift(
  CPAD,
  print.plot = TRUE,
  saveplot = TRUE,
  saveplot.ext = ".png"
)

Arguments

CPAD:

dataframe. The dataframe returned by analyse_CPAD.

saveplot:

TRUE or FALSE. Save the plots in your wd.Default TRUE.

saveplot.ext:

character. The extension for the saved figures admitted by ggsave (e.g., ".png", ".svg").Default ".png".

Details

The estimation of the single transition in the temporal trajectories of $\hat\alpha$ and $\hat\beta$ is performed via minimisaiton of the residual squared sum (RSS) (Bai. 1994).

Value

This function returns to your global environment an object list named plotbetatraj with the plot(s) created. Also, if saveplot is TRUE, a folder named betaplots in the folder plots is created in your wd.

Also, this function returns a numeric object plotShift to your Global Environment, it is the esitmated date of the single transition.

Author(s)

Simon P Castillo spcastil@uc.cl.

References

J. M. Box-Steffensmeier, J. R. Freeman, M. P. Hitt, J. C. W. Pevehouse, Time Series Analysis for the Social Sciences (Cambridge University Press, 2014).

J. Bai, Least Squares Estimation of a Shift in Linear Processes. Journal of Time Series Analysis. 15, 453–472 (1994).

Examples

1
analyseplot_shift(CPAD, saveplot=TRUE, saveplot.ext= ".png")

simonpcastillo/CPAD documentation built on Dec. 31, 2020, 7:27 a.m.