You are more than welcome! Now that I have access to my manuals ([u] 13.5),
here is the proper way to do it:
******************
webuse wpi1, clear
arima D.wpi, ar(1/2)
sca lagonecoeff=[ARMA]_b[L.ar]
sca lagtwocoeff=[ARMA]_b[L2.ar]
*let me see what`s there
sca di
******************
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Christian Vorbeck
Sent: Friday, October 31, 2008 11:39 AM
To: [email protected]
Subject: Re: st: Re: scalar for arima regression and generating new
variables
Martin,
Both worked great, thank you for your help.
Christian
On Thu, Oct 30, 2008 at 11:05 PM, Martin Weiss <[email protected]> wrote:
> On the first part: There is a more elegant way to do this, but quick and
> dirty:
>
> ***********
> webuse wpi1, clear
> arima D.wpi, ar(1/2)
> mat A=e(b)
> di A[1,2]
> di A[1,3]
> ***********
>
> HTH
> Martin
> _______________________
> ----- Original Message ----- From: "Christian Vorbeck"
> <[email protected]>
> To: <[email protected]>
> Sent: Thursday, October 30, 2008 9:29 PM
> Subject: st: scalar for arima regression and generating new variables
>
>
>> Hello,
>> let me begin by saying i am just learning stata, and that the answer
>> to this question is likely quite simple but i can't seem to find it. I
>> am running a series of arima equations and would like to save the
>> resulting coefficients (for lags 1 and 2). I have used scalar k0 =
>> _coef[_cons] to save the constant but can't figure out how to save the
>> lag's. I have tried scalar k1 = _coef [L1], [L1.] and [arL1] but they
>> don't seem to work.
>>
>> Secondly, is there a way to create a new variable with one observation
>> from a couple of other variables? lets say for example i have x1
>> through x8 with 100 obs each, is there a way to create a variable with
>> one observation (or even the median) from each ( ie. X is a column
>> with x1, x2,...,x8). This would really save me a lot of time down the
>> road so any help would be greatly appreciated. Thanks,
>>
>> Christian
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/statalist/faq
>> * http://www.ats.ucla.edu/stat/stata/
>>
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/