



Hi Mark,

Thank you for your feedback.

Yes, I am giving an x.
Concerning the error at the bottom of "SS", the same one appears in the "SS" function example in the R help.
I have tried to see what is going on inside the "kfilter" function but unfortunately I am not able to go inside it ie:
> kfilter
function (ss) 
{
    UseMethod("kfilter")
}
<environment: namespace:sspir>
> 

> Date: Wed, 20 Aug 2008 12:20:54 -0500
> From: markleeds@verizon.net
> Subject: RE: [R-SIG-Finance] SSPIR  noob question
> To: benverschuere@hotmail.com
> 
> Hi:  i don't and haven't used sspir but are you giving it an X ? it 
> doesn't look like it and you get an error before the call to kfilter
> involving x so i'm thinking it has something to do with that ? Maybe X 
> is for when you have coefficients of the Theta's in your KF and
> , since you don't, maybe you need to set it to NULL in the setup call to 
> SS.  Other than that, I would think you'd have to ask the person who 
> wrote
> sspir package or go through the code yourself. Hopefully someone else 
> will reply with a more exact answer.
> 
> 
> 
> On Wed, Aug 20, 2008 at  1:01 PM, Verschuere Benjamin wrote:
> 
> > Hi,
> >
> > I am trying to use the sspir package but I am running into an when I 
> > try to use the "kfilter" function, it seems one of my matrix has 
> > incorrect dimension but cant find why?
> >
> > If you have any idea about what my be wrong I would appreciate your 
> > help,
> >
> >
> > Thanks in advance.
> >
> > Ben
> >
> > Here is an excerpt of my code
> >
> >
> >
> >> c0=matrix(summary(loading.var)$covres,3,3)  ## setting up the initial 
> >> vcov matrix m0=matrix(CO[1,])   ## setting up the initial  state
> >>
> >> d=ncol(Y)
> >> p=ncol(X)
> >> m1 <- SS(y=Y,x=X,
> > +          Fmat=function(tt,x,phi) return(matrix(1,ncol=d,nrow=p)),
> > +          Gmat=function(tt,x,phi) return(matrix(1,ncol=p,nrow=p )),
> > +          Wmat=function(tt,x,phi) return(matrix(5,ncol=p,nrow=p)),
> > +          Vmat=function(tt,x,phi) return(matrix(100,ncol=d,nrow=d)),
> > +          m0=m0,C0=c0
> > +          )     ### setting up the state space model
> >>
> >> m1
> > ------------------------------------------------------------
> > The state space model is given by
> >
> > Y_t     = F_t^T %*% theta_t     + v_t, v_t ~ N(0,V_t)
> > theta_t = G_t   %*% theta_{t-1} + w_t, w_t ~ N(0,W_t)
> >
> > for t=1,...,143
> > ------------------------------------------------------------
> > Dimensions of the involved terms:
> > dim(Y_t) = 10 x 1   (dx1)
> > dim(F_t) = 3 x 10   (pxd)
> > dim(G_t) = 3 x 3   (pxp)
> > dim(V_t) = 10 x 10   (dxd)
> > dim(W_t) = 3 x 3   (pxp)
> > dim(C_0) = 3 x 3   (pxp)
> > dim(m_0) = 3 x 1   (px1)
> > ------------------------------------------------------------
> > The terms:
> > Y=
> > First 10 cols
> >            x.11      x.12       x.13         x.14    x.15      x.16 
> > x.17        x.18      x.19       x.110
> >  [1,]    5.925    5.925    6.135    6.275    6.405    6.575     6.755 
> > 6.94      7.04      7.06
> >  [2,]    6.215    6.215    6.415    6.585    6.695    6.885     7.055 
> > 7.23      7.31      7.32
> >  [3,]    6.380    6.380    6.590    6.740    6.850    7.000     7.190 
> > 7.41      7.45      7.40
> >  [4,]    6.075    6.440    6.640    6.760    6.870    7.030     7.200 
> > 7.25      7.28      7.26
> >  [5,]    6.210    6.415    6.585    6.725    6.815    6.985     7.145 
> > 7.29      7.33      7.33
> >  [6,]    6.090    6.505    6.715    6.865    6.975    7.125     7.220 
> > 7.44      7.50      7.51
> >  [7,]    5.970    6.265    6.465    6.605    6.705    6.885     7.035 
> > 7.18      7.25      7.27
> >  [8,]    5.930    5.905    6.065    6.215    6.315    6.475     6.665 
> > 6.83      6.91      6.94
> >  [9,]    5.655    5.745    5.865    5.985    6.065    6.205     6.355 
> > 6.54      6.63      6.69
> > [10,]    5.810    6.025    6.215    6.355    6.465    6.595     6.745 
> > 6.91      6.98      6.98
> > phi= (the parametervector)
> > [1] 1 1
> >
> > x= (the list of covariates)
> > Error in x$x$x : $ operator is invalid for atomic vectors
> >>
> >
> >> m1.f <- kfilter(m1)
> > Error in Gmat %*% t(mx) : non-conformable arguments
> > _________________________________________________________________
> > Explore the seven wonders of the world
> >
> > BRE
> > 	[[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-SIG-Finance@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only.
> > -- If you want to post, subscribe first.

_________________________________________________________________


e=wlmailtagline
	[[alternative HTML version deleted]]

