
findstysols
into
a single object for further analysismergexy(l)
findstysols
findstysols
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
.
findstysols
, LCTSres
,
COEFbothscale
#
# Run two optimizations (don't run in R installation as it is compute intense)
#
solnset1 <- findstysols(Nsims=1, tsx=x2, tsy=y2)
solnset2 <- findstysols(Nsims=1, tsx=x2, tsy=y2)
#
# Merge them
#
solnset <- mergexy(solnset1, solnset2)
#
# The previous three commands are equivalent to
#
solnset <- findstysols(Nsims=2, tsx=x2, tsy=y2)
#
# Although the single command is more elegant the previous set of three
# has the advantage that the two calls to findstysols can be executed by,
# e.g. two different processors hence speeding overall execution time.
#
Run the code above in your browser using DataLab