Learn R Programming

costat (version 2.4.1)

mergexy: Concatenate a set of solution results into one set

Description

Merges several sets of optimization results from multiple calls to findstysols into a single object for further analysis

Usage

mergexy(...)

Value

A set of optimization solutions in the same format as those returned by findstysols

Arguments

...

An unspecified number of arguments of class csFSS. (usually a set of objects containing a set of optimization solutions, such as that returned by findstysols)

Author

Guy Nason

Details

The return object from an invocation of the findstysols is a list containing a number of interesting components containing information about the starting parameters, the (hopefully optimal) ending parameters, convergence status, minimum variance achieved and p-value associated with the final test of stationarity after an optimization.

It is possible to ask findstysols to execute multiple optimization runs in the same function, by choice of the Nsims parameter. However, for truly large runs, it can be convenient to run multiple copies of findstysols, for example on multiple processors simultaneously (a coarse grained parallelism).

In particular, for large time series, it can be useful to run findstysols for one optimization run (as running more than one for a very large series can cause the software to fail as R can run out of memory. Actually, for very very large series even one optmization run can fail for memory reasons).

In this way multiple optimization runs can be executed with each one producing its own set of results. This function (mergexy) takes a list of object names of all of the results, and merges the results into one object as if a single call to findstysols had been executed. Such a single set of results can then be passed on to further analysis routines, such as COEFbothscale or LCTSres.

References

Cardinali, A. and Nason, Guy P. (2013) Costationarity of Locally Stationary Time Series Using costat. Journal of Statistical Software, 55, Issue 1.

Cardinali, A. and Nason, G.P. (2010) Costationarity of locally stationary time series. J. Time Series Econometrics, 2, Issue 2, Article 1.

See Also

findstysols, LCTSres, COEFbothscale

Examples

Run this code
#
# Generate two dummy time series
#
x1 <- rnorm(32)
y1 <- rnorm(32)
#
# Run two optimizations 
#
if (FALSE) solnset1 <- findstysols(Nsims=1, tsx=x1, tsy=y1)
if (FALSE) solnset2 <- findstysols(Nsims=1, tsx=x1, tsy=y1)
#
# Merge them
#
if (FALSE) solnset <- mergexy(solnset1, solnset2)

Run the code above in your browser using DataLab