I tried to specify a model in dse1 but something isn't right. Anybody have any tips? model<-SS(F=f,G=g,H=h,Q=q,z0=z,P0=p) Error in locateSS(model$R, constants$R, "R", p, p, plist) : The dimension of something in the SS model structure is bad.> dim(f)[1] 5 5> dim(g)[1] 5 1> dim(h)[1] 1 5> dim(q)[1] 5 5> dim(z)[1] 5 1> dim(p)[1] 5 5 thanks, Bob
I can't identify the problem. The package author and maintainer, Paul Gilbert, might be able to help. Have you tried "debug(SS)"? This will allow you to walk through the function line by line looking at things, etc. This often produces enlightenment. Alternatively, have you considered the "dlm" package? In addition to a vignette, it has a companion book, Petris, Petrone, and Campagnoli (2009) Dynamic Linear Models with R (Springer). Hope this helps. Spencer Graves Bob McCall wrote:> I tried to specify a model in dse1 but something isn't right. Anybody > have any tips? > > model<-SS(F=f,G=g,H=h,Q=q,z0=z,P0=p) > Error in locateSS(model$R, constants$R, "R", p, p, plist) : > The dimension of something in the SS model structure is bad. > > >> dim(f) >> > [1] 5 5 > >> dim(g) >> > [1] 5 1 > >> dim(h) >> > [1] 1 5 > >> dim(q) >> > [1] 5 5 > >> dim(z) >> > [1] 5 1 > >> dim(p) >> > [1] 5 5 > > thanks, > Bob > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >
I think the problem here is that you seem to be trying to specify a non-innovations form model, for which both Q and R need to be specified, but you have only specified Q. The code guesses whether you are specifying an innovations model or an non-innovations model based on whether you specify the Kalman gain K. Since you don't specify K, it assumes a non-innovations form and expects to find both Q and R. It seems one of my error checks could be improved. Paul Bob McCall wrote:> I tried to specify a model in dse1 but something isn't right. Anybody > have any tips? > > model<-SS(F=f,G=g,H=h,Q=q,z0=z,P0=p) > Error in locateSS(model$R, constants$R, "R", p, p, plist) : > The dimension of something in the SS model structure is bad. > > >>dim(f) > > [1] 5 5 > >>dim(g) > > [1] 5 1 > >>dim(h) > > [1] 1 5 > >>dim(q) > > [1] 5 5 > >>dim(z) > > [1] 5 1 > >>dim(p) > > [1] 5 5 > > thanks, > Bob > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.=================================================================================== La version fran?aise suit le texte anglais. ------------------------------------------------------------------------------------ This email may contain privileged and/or confidential information, and the Bank of Canada does not waive any related rights. Any distribution, use, or copying of this email or the information it contains by other than the intended recipient is unauthorized. If you received this email in error please delete it immediately from your system and notify the sender promptly by email that you have done so. ------------------------------------------------------------------------------------ Le pr?sent courriel peut contenir de l'information privil?gi?e ou confidentielle. La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute diffusion, utilisation ou copie de ce courriel ou des renseignements qu'il contient par une personne autre que le ou les destinataires d?sign?s est interdite. Si vous recevez ce courriel par erreur, veuillez le supprimer imm?diatement et envoyer sans d?lai ? l'exp?diteur un message ?lectronique pour l'aviser que vous avez ?limin? de votre ordinateur toute copie du courriel re?u.