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

Change "data" in an already defined SSModel #12

Open
trickster opened this issue May 18, 2016 · 2 comments
Open

Change "data" in an already defined SSModel #12

trickster opened this issue May 18, 2016 · 2 comments

Comments

@trickster
Copy link

Is there a way where we can change underlying data specified in SSModel function or copy the entire contents of the model into a new model and specify new data then?

@helske
Copy link
Owner

helske commented May 23, 2016

Hmm, haven't though about this before. The data argument is used only when building the observations and the system matrices in SSModel, and that is not actually stored in the output model at all. The call to SSModel is stored though, so you could manipulate that before the re-evaluation of that call. Using the stored call, I think it would be pretty straightforward to make a function which takes a SSModel object and new data object, and then returns a model identical to the original model except with new data. At least for some special cases...

@trickster
Copy link
Author

Thanks for your reply. I had to rerun the model with the less data by extracting the list of variables and model structure using attr(model.in$terms,"variables") from the old model.

This would be a nice enhancement though.

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