Dear Bill, Appreciate all your effort. I hope some one here can respond to this query.
Many thanks, Ashim On Thu, Jan 24, 2019 at 12:49 AM Bill Poling <bill.pol...@zelis.com> wrote: > > Ashim. > > I see where I was mistaken, using MARSSparamsCIs(fit) <--Somehow I got an > s in between param & Cis. > > I now get new error similarly as you, my apologies. > > final <- MARSSparamCIs(fit) > Error in dpari[time.varying] <- dparmat(MLEobj, time.varying, t = t) : > replacement has length zero > > WHP > > From: R-help <r-help-boun...@r-project.org> On Behalf Of Ashim Kapoor > Sent: Wednesday, January 23, 2019 1:38 AM > To: r-help@r-project.org > Subject: [R] Unable to compute Confidence Intervals from output from MARSS > package > > Dear All, > > I am trying to use this package ---> > https://cran.r-project.org/web/packages/MARSS/index.html > I am reading this book which shows some examples based on the above package > ---> https://nwfsc-timeseries.github.io/atsa-labs/ > > In a few words, the incantation MARSS(...) estimates the parameters and > MARSSparamCIs should return the confidence intervals. My problem is that > MARSSparamCIs returns this error :- > > > MARSSparamCIs(fit) > Error in MARSSharveyobsFI(MLEobj) : replacement has length zero > > > > ### This page and the next page, explains the jargon used : > > https://nwfsc-timeseries.github.io/atsa-labs/sec-dlm-example-of-a-univariate-dlm.html > > ### Here is a MWE to recreate the error :- > > # This is a Time Varying Parameters regression > # Here a is fixed and b is doing a RW. > > x1 <- rnorm(1000) > b <- cumsum(rnorm(1000, sd = sqrt(.6))) > y <- 1 + b*x1 + rnorm(1000) > > Z = array(NA,c(1,2,1000)) > Z[1,1,] = rep(1,1000) > Z[1,2,] = x1 > > mod2.list = list ( B = matrix(c(1,0,0,1),nrow = 2 , byrow = T), U = > matrix(0,2,1), > Q = matrix(list(0,0,0,"s2b"),2,2), Z= Z, A = matrix(0), R = matrix("r")) > > fit = MARSS(as.vector(y), model = mod2.list,inits = > list(x0=matrix(0,nrow=2,ncol=1))) > > MARSSparamsCIs(fit) > > # The above will give this error : > Error in MARSSharveyobsFI(MLEobj) : replacement has length zero > > Best Regards, > Ashim > > [[alternative HTML version deleted]] > > ______________________________________________ > mailto:R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. > > Confidentiality Notice This message is sent from Zelis. This transmission > may contain information which is privileged and confidential and is > intended for the personal and confidential use of the named recipient only. > Such information may be protected by applicable State and Federal laws from > this disclosure or unauthorized use. If the reader of this message is not > the intended recipient, or the employee or agent responsible for delivering > the message to the intended recipient, you are hereby notified that any > disclosure, review, discussion, copying, or taking any action in reliance > on the contents of this transmission is strictly prohibited. If you have > received this transmission in error, please contact the sender immediately. > Zelis, 2018. > > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.