Open philippcla opened 8 years ago
To aggregate multiple results, we have no built in GMWM function that achieves this presently. Primarily because the gmwm()
function was designed to iterate over only one signal vs. multiple signals each with their own model (c.f. gmwm.imu()
is restricted to 1 signal). The initial design reason for this was simplicity of the gmwm
estimation command.
Though, I can definitely see benefits to this approach. One primarily being that this model limitation is a bit relaxed with both rank.models()
and auto.imu()
with similar options. So being able to add in a batch estimation procedure should be fine.
In the interim, to aggregate values, use:
# Assume that `data.set` is a matrix that contains all `vector_of_interest`
nsignals = ncol(data.set)
# Define a model (my_gmwm_model)
model = AR1() + WN()
# Create a matrix that stores parameters by signal
mat = matrix(NA, # Create a matrix filled with NA (missing values)
nrow = nsignals, # Each signal has its own row
ncol = model$plength ) # Each parameter has its own column
for (i in seq_len(nsignals))
{
gmwm_values[i,] = t(gmwm(model = model, data = data.set[,i])$estimate)
}
The above assumes the same model at each turn.
ok, for the time being this is a nice workaround. I would just need to store all the different informations (estimate, theo, ..) from the gmwm_variable (in your example denoted as "t") thanks
Hello
I have the following code:
This works fine.
Now, if I have a for-loop, where I have multiple "vector_of_interests" I will not be able to store the "gmwm_values" in a vector-like-manner. The code would be something like this
Is there some other way to assemble the gmwm-results? Thanks