panelAR (version 0.1)

run.analysis: Run Analysis for Panel Data

Description

Provides a run analysis within each panel. Calculates number of runs per panel and returns start time, end time, and the length of each run.

Usage

run.analysis(object)

Arguments

object
an object of class "panelAR".

Value

The output of the function is an object of class "panelAR.runs".
run.count
a named vector indicating the number of runs per panel.
runs
a data frame, with each row corresponding to a run in the data. Panels with multiple runs appear in multiple rows. The data frame contains the start time of the run, the end time of the run, and the length of the run.
rho
autocorrelation parameters. Scalar if "ar1" option was used, vector of length $N_p$ (number of panels) if "psar1" option was used, and NULL if "none" option was used.

See Also

The function panelAR.

Examples

Run this code
data(WhittenWilliams)
# expect warning urging to use 'complete.case=FALSE'
out <- panelAR(milex_gdp~lag_milex_gdp+GOV_rl+gthreat+GOV_min+GOV_npty+election_yr+
lag_real_GDP_gr+cinclag+lag_alliance+lag_cinc_ratio+lag_us_change_milex_gdp, 
data=WhittenWilliams, panelVar="ccode", timeVar="year", autoCorr="psar1", 
panelCorrMethod="pcse", complete.case=TRUE)

run.analysis(out) # overview
run.analysis(out)$runs # details of each run

Run the code above in your browser using DataLab