Displaying 20 results from an estimated 1000 matches similar to: "assessing goodness of variance prediction"
2010 Sep 28
0
Time invariant coefficients in a time varying coefficients model using dlm package
Dear R-users,
I am trying to estimate a state space model of the form
(1) b_t = G * b_t-1 + w_t w_t ~ N(0,W)
(2) y_t= A' * x_t + H' * b_t + v_t v_t ~ N(0,V)
(Hamilton 1984: 372)
In particular my estimation in state space form looks like
(3) a3_t = 1 * a3_t-1 + w_t w_t ~ N(0,W)
(4) g_t = (a1, a2) * (1, P_t)' + u_t * a3_t + v_t v_t ~ N(0,V)
where g_t is the
2010 Oct 06
1
dlm package: how to specify state space model?
Dear r-users!
I have another question regarding the dlm package and I would be very
happy if someone could give me a hint!
I am using the dlm package to get estimates for an endogenous rate of
capacity utilization over time. The general form of a state space model
is
(1) b_t = G * b_t-1 + w_t w_t ~ N(0,W)
(2) y_t= A' * x_t + H' * b_t + v_t v_t ~ N(0,V)
(Hamilton 1984: 372)
The
2007 Feb 21
1
loops in R help me please
I am trying to make the following Kalman filter equations work and therefore produce their graphs.
v_t=y_t - a_t
a_t+1=a_t+K_t*v_t
F_t=P_t+sigma.squared.epsilon
P_t+1=P_t*(1-K_t)+sigma.squared.eta
K_t=P_t/F_t
Given:
a_1=0,P_1=10^7,sigma.squared.epsilon=15099,
sigma.squared.eta=1469.1
I have attached my code,which of course doesnt work.It produces NAs for the Fs,Ks and the a.
Can somebody tell me
2007 Nov 24
0
Help on State-space modeling
Hi all,
I'm working on a term structure estimation using state-space modeling for
1, 2 and 3 factor models.
When I started to read the functions on R, I got to the function ss on the
library sspir. From what I
understood this function is similar to SsfFit from S-PLUS. But for my models
purpose there is something
left to be desired. Its formulation follow these equations:
*Y_t = F_t^T *
2009 Feb 15
0
Kalman Filter - dlm package
Dear all,
I am currently trying to use the "dlm" package for Kalman filtering.
My model is very simple:
Y_t = F'_t Theta_t + v_t
Theta_t = G_t Theta_t-1 + w_t
v_t ~ N(0,V_t) = N(0,V)
w_t ~ N(0,W_t) = N(0,W)
Y_ t is a univariate time series (1x1)
F_t is a vector of factor returns (Kx1)
Theta_t is the state vector (Kx1)
G_t is the identity matrix
My first
2010 Nov 24
0
Seeking advice on dynamic linear models with matrix state variable.
Hello, fellow R users,
I recently need to estimate a dynamic linear model in the following form:
For the measurement equation:
Y_t = F_t * a_t + v_t
where Y_t is the observation. It is a 1 by q row vector for each t.
F_t is my forecasting variable. It is a 1 by p row vector.
a_t is my state variable. It is a p by q MATRIX of parameters with each column of the matrix being regression
2008 May 07
1
dlm with constant terms
Hi,
I am trying to figure how to use dlm with constant terms
(possibly time-dependent) added to both equations
y_t = c_t + F_t\theta_t + v_t
\theta_t = d_t + G_t\theta_{t-1} + w_t,
in the way that S-PLUS Finmetrics does?
Is there any straightforward way to transform the above to
the default setup?
Thanks,
Tsvetan
--------------------------------------------------------
NOTICE: If received in
2013 Jan 03
2
simulation
Dear R users,
suppose we have a random walk such as:
v_t+1 = v_t + e_t+1
where e_t is a normal IID noise pocess with mean = m and standard deviation = sd and v_t is the fundamental value of a stock.
Now suppose I want a trading strategy to be:
x_t+1 = c(v_t – p_t)
where c is a costant.
I know, from the paper where this equations come from (Farmer and Joshi, The price dynamics of common
2013 Apr 29
1
Arma - estimate of variance of white noise variables
Hi all,
Suppose I am fitting an arma(p,q) model to a time series y_t.
So, my model should contain (q+1) white noise variables.
As far as I know, each of them should have the same variance.
How do I get the estimate of this variance by running the arma(y) function
(or is there any other way)?
Appreciate your help.
Thanks,
Preetam
--
Preetam Pal
(+91)-9432212774
M-Stat 2nd Year,
2000 Sep 22
0
what do you do for 2SLS or 3SLS
For 2 or 3 stage least squares, what do you R folks do?
Follow-up question. My student wants to estimate this. 2 variables are
governed by a system of difference equations. His theory is like so.
Y_t and X_t are
state variables, we want estimates for a, g, b, and h.
X_(t+1) = 1 + a X_t + (a/K)* (X_t)^2 - g Y_t X_t
Y_(t+1) = b Y_t + h* X_t * Y_t
K is perhaps something to estimate, but it
2008 Mar 26
0
recursive multivariate filter with time-varying coefficients
Hi,
I've been searching CRAN and the web for a recursive multivariate
filter with time-varying coefficients.
What I mean is the following:
I have a series of square matrices A_t
an initial value vector y_0
and I need to compute
y_t =A_t%*%y_t-1
As these y_t may diverge quickly and/or lead to underflow problems,
the y_t need to be scaled by eg
y_t =y_t/sum(y_t-1)
Is anyone aware
2006 Oct 23
0
likelihood question not so related to R but probably requires the use of R
I have a question and it's only relation to R is that I probably need R
after I understand what to do.
Both models are delta y_t = Beta + epslion
and suppose I have a null hypothesis and alternative hypothesis
H_0 : delta y_t = zero + epsilon epsilon is normal ( 0,
sigmazero^2 )
H_1 delta y_t = beta + epsilon epsilon is normal (
sigmabeta^2 )
2008 Sep 10
2
arima and xreg
Dear R-help-archive..
I am trying to figure out how to make arima prediction when I have a
process involving multivariate time series input, and one output time
series (output is to be predicted) .. (thus strictly speaking its an
ARMAX process). I know that the arima function of R was not designed
to handle multivariate analysis (there is dse but it doesnt handle
arma multivariate analysis, only
2013 Jan 11
0
Manual two-way demeaning of unbalanced panel data (Wansbeek/Kapteyn transformation)
Dear R users,
I wish to manually demean a panel over time and entities. I tried to code
the Wansbeek and Kapteyn (1989) transformation (from Baltagi's book Ch. 9).
As a benchmark I use both the pmodel.response() and model.matrix() functions
in package plm and the results from using dummy variables. As far as I
understood the transformation (Ch.3), Q%*%y (with y being the dependent
variable)
2007 May 08
2
statistics/correlation question NOT R question
This is not an R question but if anyone can help me, it's much
appreciated.
Suppose I have a series ( stationary ) y_t and a series x_t ( stationary
)and x_t has variance sigma^2_x and epsilon is normal
(0, sigma^2_epsilon )
and the two series have the relation
y_t = Beta*x_t + epsilon
My question is if there are particular values that sigma^2_x and
sigma^2_epsilon have to take in
2011 Sep 24
0
Assessing prediction performance of SVM using e1071 package
Dear R-Users!
I am using the svm function (e1071 package) to classify two groups using a
set of 180 indicator variables. Now I am confused about the cross-validation
procedure.
(A) On one hand I use the setting cross=10 in the svm function to run 10
cross-validation iterations and to get an estimate of the svm's performance
in prediction.
(B) On the other hand most tutorials I found
2013 Jun 17
0
Invert a positive definite symmetric Block Toeplitz Matrix
Is there a function in r that let's you efficiently invert a positive
definite symmetric Block Toeplitz matrix? My matrices are the covariance
matrices of observations of a multivariate time series and can be
1000*1000 or larger.
I know the package 'ltsa' which seems to use the Trench algorithm to
compute the inverse of a Toeplitz matrix. I am looking for a so to say
2008 Sep 10
0
FW: RE: arima and xreg
hi: you should probably send below to R-Sig-Finance because there are
some econometrics people over there who could also possibly give you
a good answer and may not see this email ? Also, there's package called
mar ( I think that's the name ) that may do what you want ?
Finally, I don't know how to do it but I think there are ways of
converting a multivariate arima into the
2007 May 21
1
Sample correlation coefficient question NOT R question
This is a statistics question not an R question. When calculating the
sample correlation coefficient cor(x_t,y_t) between say
two variables, x_t and y_t t=1,.....n ( one can assume that the
variables are in time but I don't think this really matters
for the question ), does someone know where I can find any piece of
literature that says that each (x_j,y_j) pair has
To be independent from the
2006 Apr 29
1
SSPIR problem
I am having a problem with the package SSPIR. The code below
illustrates it. I keep getting the message: "Error in y - f :
non-conformable arrays."
I tried to tweak the code below in many different ways, for example,
substituting rbind for cbind, and sometimes I get a different error
message, but I could not find a variation of this code that would
work.
Any help will be greatly