Hi folks, Not sure what this sort of estimation is called. I have a 2-column time-series x(i,t) [with (i=1,2; t=1,...T)], and I want to do the following 'simultaneous' regressions: x(1,t) = (d - 1)(x(1, t-1) - mu(1)) x(2,t) = (d - 1)(x(2, t-1) - mu(2)) And I want to determine the coefficients d, mu(1), mu(2). Note that the d should be the same for both estimations, whereas the coefficients mu will have two values mu(1), mu(2), one for each estimation. Is this possible to do in R? What would be the corresponding syntax in, say, lm? Thanks, Murali
On Tue, Aug 31, 2010 at 6:58 AM, <Murali.Menon at avivainvestors.com> wrote:> Hi folks, > > Not sure what this sort of estimation is called. I have a 2-column time-series x(i,t) [with (i=1,2; t=1,...T)], and I want to do the following 'simultaneous' regressions: > > x(1,t) = (d - 1)(x(1, t-1) - mu(1)) > x(2,t) = (d - 1)(x(2, t-1) - mu(2)) > > And I want to determine the coefficients d, mu(1), mu(2). > > Note that the d should be the same for both estimations, whereas the coefficients mu will have two values mu(1), mu(2), one for each estimation. > > Is this possible to do in R? > > What would be the corresponding syntax in, say, lm? >Assuming appropriate error structure, try lm(x ~ xlag + f - 1) where x is a vector of all the data strung out except for the first time point and xlag is the corresponding lagged vector and f is a factor such that f[i] indicates which column x[i] came from. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
On 31/08/2010 6:58 AM, Murali.Menon at avivainvestors.com wrote:> Hi folks, > > Not sure what this sort of estimation is called. I have a 2-column time-series x(i,t) [with (i=1,2; t=1,...T)], and I want to do the following 'simultaneous' regressions: > > x(1,t) = (d - 1)(x(1, t-1) - mu(1)) > x(2,t) = (d - 1)(x(2, t-1) - mu(2)) > > And I want to determine the coefficients d, mu(1), mu(2). > > Note that the d should be the same for both estimations, whereas the coefficients mu will have two values mu(1), mu(2), one for each estimation. > > Is this possible to do in R? > > What would be the corresponding syntax in, say, lm?Your specification is not complete: you haven't said what the errors will be, or how x(1,1) and x(2,1) are determined. I assume you mean independent normal errors, but are you willing to assume the variance is the same in both series? If so, then your model is almost equivalent to a linear model with concatenated x(1,t) and x(2,t) values. (This would be the "partial likelihood" version of the model, where you don't try to fit x(i, 1), but you fit the rest of the values conditional on earlier ones.) If you want the full likelihood or you want separate variances for the two series, you probably need to write out the likelihood explicitly and maximize it. Duncan Murdoch