On Tue, Aug 31, 2010 at 6:58 AM, <murali.me...@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 ______________________________________________ R-help@r-project.org mailing list 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.