Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weights from the OMEGA-matrix #185

Open
philippcla opened this issue Jun 2, 2016 · 3 comments
Open

Weights from the OMEGA-matrix #185

philippcla opened this issue Jun 2, 2016 · 3 comments

Comments

@philippcla
Copy link

philippcla commented Jun 2, 2016

Hello,

The OMEGA-matrix gives me the weights on the different scales, that is ok. Normally, all the scales are considered with a specific weight.

Is there some way to modify the values of the matrix for a specific scale? Let's say: I do not want the GMWM to take the first scale into account (for whatever reasons: esthetic, physical principles not conisdered, other unknown noises...).
the original is:

my_gmwm = gmwm(my_personal_model, my_data)

This would become (if I had 6 scales, which I will change the weight to zero for the first and the last scale, the others are untouched):

my_gmwm = gmwm(my_personal_model, my_data, weights = [0 1 1 1 1 0])

Thanks

@coatless coatless changed the title Wheights from the OMEGA-matrix Weights from the OMEGA-matrix Jun 2, 2016
@coatless
Copy link
Contributor

coatless commented Jun 2, 2016

This would be a bit problematic currently as the system to initially calculate the gmwm is closed off.

The best that can be done in terms of specifying your own omega matrix is to initially calculate using gmwm() procedure, modify the gmwm object via V (matrix before inversion) found in the parameter list, and then use update.gmwm() to perform the estimation.

The caveat here is that V must be a diagonal matrix (if not, the program will make it diagonal before the inverse).

So, something along the lines of:

# Generate some data
set.seed(1336)
n = 200
exact.model = AR1(phi=.99, sigma2 = 0.01) + WN(sigma2=1)
data = gen.gts(exact.model)

# Create an initial model that is not accurate
throwaway = gmwm(AR1(), data = data)

# Create a diagonal matrix of dimensions 9 x 9 (1 on diagonal)
# Need 9 scales due to J = floor(log2(n))
throwaway$orgV = diag(9)

# The orgV matrix MUST be diagonal! If it is not diagonal, the program will make it diagonal (major)

# Models can contain specific parameters e.g.
updated.model = update(throwaway, exact.model)

@philippcla
Copy link
Author

Ok, just to be clear: I do not want to change the scales or the weights, I just want to turn ON or turn OFF a scale. For the rest I completely agree: the gmwm should stay completely closed off.

@coatless
Copy link
Contributor

coatless commented Jun 8, 2016

Gotcha. There is no way to really turn on and off scales.

I'll think about the best way to approach it and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants