[R] weighted(?) regression

2013-06-11 Thread M M
folks, any suggestions on how to estimate the following regression? i'm not even sure if this kind of regression has a name? y(t) = phi * y(t-1) + (1 - phi) * x(t) + e(t) i need to determine phi, which has to be in (0, 1) i don't know how to fit this into the lm() formulation. thanks, murali

Re: [R] matrix of random variables from a matrix of means and matrix of sd

2013-05-24 Thread M M
(4, mean = a, sd = b), ncol = 2)) > > set.seed(59187) > res2 <- array(rnorm(40, mean = a, sd = b), dim = c(2, 2, 10)) > > identical(res1, res2) # TRUE > > > Hope this helps, > > Rui Barradas > > Em 24-05-2013 20:22, M M escreveu: > > folks, > >

[R] matrix of random variables from a matrix of means and matrix of sd

2013-05-24 Thread M M
folks, if i have a matrix of means: a <- matrix(1:4, 2) and a matrix of std deviations: b <- matrix(5:8, 2) and i want to create a matrix X of random variates such that X[i, j] is a draw from normal distribution with mean = a[i, j] and std dev = b[i, j], i think i can do this? X <- matrix(rnorm(

[R] Model selection in nonstationary VAR

2013-02-22 Thread M M
Folks, Is there any implementation available in R for the simultaneous selection of lag order and rank of a nonstationary VAR as described in Chao & Phillips (1999): Model selection in partially nonstationary vector autoregressive processes with reduced rank structure, J. Econ. (91). Or any othe