Displaying 8 results from an estimated 8 matches for "ssmodel".
2017 Jul 30
4
Kalman filter for a time series
...end = endDate,
quote="AdjClose", provider="yahoo",
compression="d", quiet=T)
prices.ts = ts(prices)
return( prices.ts )
}
kalmanFilter = function( x )
{
t = x
if (class(t) != "ts") {
t = ts(t)
}
ssModel = structSSM( y = t, distribution="Gaussian")
ssFit = fitSSM(inits=c(0.5*log(var(t)), 0.5*log(var(t))), model = ssModel )
kfs = KFS( ssFit$model, smoothing="state", nsim=length(t))
vals = kfs$a
lastVal = vals[ length(vals)]
return(lastVal)
}
Start = "2011-01-01&qu...
2017 Jul 30
0
Kalman filter for a time series
> structSSM
Is no longer part of KFAS. All you needed to do was:
library(KFAS)
?KFAS
and you would have seen that if you went to the index. A structural state space model is now built up from its components, much like in LM. Look at;
?SSModel
-Roy
> On Jul 29, 2017, at 9:26 PM, Staff <rbertematti at gmail.com> wrote:
>
> I found an example at
> http://www.bearcave.com/finance/random_r_hacks/kalman_smooth.html shown
> below. But it seems the structSSM function has been removed from KFAS
> library so it won'...
2009 Sep 04
1
How should a SelfStart function handle illegal parameter values?
Hi Everyone,
I'm trying to write selfStart non-linear models for use with nls. In these
models some combinations of parameter values are illegal; the function value
is undefined.
That's OK when calling the function directly [e.g. SSmodel(x, pars...)]; I
return an appropriate non-value such as NA or Inf.
However, when called from nls [e.g. nls(y~SSmodel(x, pars...), ...)] those
non-values lead to errors such as (but not limited to):
Error in numericDeriv(form[[3L]], names(ind), env) :
Missing value or an infinity produc...
2009 Sep 21
1
How to use nls when [selfStart] function returns NA or Inf??
...ime, so I'm venturing to repost with some
additional information.
I'm trying to write selfStart non-linear models for use with nls. In these
models some combinations of parameter values are illegal; the function value
is undefined.
That's OK when calling the function directly [e.g. SSmodel(x, pars...)]; it
is appropriate to return an appropriate non-value such as NA or Inf.
However, when called from nls [e.g. nls(y~SSmodel(x, pars...), ...)] those
non-values lead to errors such as (but not limited to):
Error in numericDeriv(form[[3L]], names(ind), env) :
Missing value or...
2017 Jul 30
1
Kalman filter for a time series
> On Jul 30, 2017, at 5:10 AM, Spencer Graves <spencer.graves at effectivedefense.org> wrote:
>
>
>
> On 2017-07-29 11:26 PM, Staff wrote:
>> I found an example at
>> http://www.bearcave.com/finance/random_r_hacks/kalman_smooth.html
>
> That example is signed by "Ian Kaplan". There's a box at the bottom of the page for you to email
2017 Jul 30
0
Kalman filter for a time series
...der="yahoo",
> compression="d", quiet=T)
>
> prices.ts = ts(prices)
> return( prices.ts )
> }
>
> kalmanFilter = function( x )
> {
> t = x
> if (class(t) != "ts") {
> t = ts(t)
> }
> ssModel = structSSM( y = t, distribution="Gaussian")
> ssFit = fitSSM(inits=c(0.5*log(var(t)), 0.5*log(var(t))), model = ssModel )
> kfs = KFS( ssFit$model, smoothing="state", nsim=length(t))
> vals = kfs$a
> lastVal = vals[ length(vals)]
> return(lastVal)...
2001 Jan 23
0
1.2.1 segfault
...Program received signal SIGWINCH, Window size changed.
0xef5b7400 in poll ()
(gdb)
Continuing.
z <- ARMA(A=array(c(1,.5,.3),c(3,1,1)),
B=array(1,c(1,1,1)),
C=NULL, description="simplified guide example")
VARmodel <-l(z,simulate(z, rng=test.rng))
SSmodel <- l(to.SS(VARmodel), VARmodel$data)
+
+ > > > > >
>
Program received signal SIGWINCH, Window size changed.
0xef5b7400 in poll ()
(gdb)
Continuing.
> gctorture()
>
Program received signal SIGWINCH, Window size changed.
0xef5b7400 in poll ()
(gdb)
Continuing.
> ts...
2011 May 17
0
Help fit 5 nonlinear models. - Plant growth curves
...------------------------------------------------------------------
Finally, my next step is to automatized the process, with loops, for
running each variable with each model in each treatment, which are 4,
but i am beginner in R program. Can anyone give a idea about it?.
Also, i just tried to use SSmodels, like SSlogis, SSgompertz and
SSRichards, but i have models as monomolecular and gauss function that
aren't defined in this algoritms.
Thanks for your help or suggestions.
--
Alejandro Coca
UN
-------------- next part --------------
DDT TRAT REP ALTURAM NHT NHE NHS PSEUDO DIAM AF PSB PSV PS...