Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Degas Wright" <dwright@cornerstoneadvice.com> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: RE: RE: RE: RE: RE: RE: RE: RE: RE: Foreach Command in Panel Data |

Date |
Wed, 29 Sep 2010 22:12:27 -0400 |

Steve, Thanks - it does appear that it is an option. Degas A. Wright, CFA Chief Investment Officer Decatur Capital Management, Inc. 250 East Ponce De Leon Avenue, Suite 325 Decatur, Georgia 30030 Voice: 404.270.9838 Fax:404.270.9840 Website: www.decaturcapital.com -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Steve Samuels Sent: Wednesday, September 29, 2010 6:12 PM To: statalist@hsphsun2.harvard.edu Subject: Re: st: RE: RE: RE: RE: RE: RE: RE: RE: RE: Foreach Command in Panel Data I have't used the command either, but the -help- should indicate if "if" is an option. Best. Steve On Wed, Sep 29, 2010 at 4:54 PM, Degas Wright <dwright@cornerstoneadvice.com> wrote: > Nick, > Unfortunately when I tried moving the if statement I get the following: > > . forvalues xticker=1/`r(max)'{ > . fcast compute f_ if xticker==`xticker' > } > > if not allowed > > Is it possible that the fcast command does not allow if statements? I > understand that you have not used this command before but is there an > alternate way to handle this loop? > > Again thanks for your input. > > Degas A. Wright, CFA > Chief Investment Officer > Decatur Capital Management, Inc. > 250 East Ponce De Leon Avenue, Suite 325 > Decatur, Georgia 30030 > Voice: 404.270.9838 > Fax:404.270.9840 > Website: www.decaturcapital.com > > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox > Sent: Wednesday, September 29, 2010 11:42 AM > To: 'statalist@hsphsun2.harvard.edu' > Subject: st: RE: RE: RE: RE: RE: RE: RE: RE: Foreach Command in Panel > Data > > I have never used -fcast- but I imagine that > > fcast compute f_, step(3) if xticker==`xticker' > > should be > > fcast compute f_ if xticker==`xticker', step(3) > > as -if- qualifiers are not options so far as Stata is concerned. > > Nick > n.j.cox@durham.ac.uk > > Degas Wright > > Thank you for the reference to 8/05 FAQ and it worked great for > calculating the var for my dataset. A follow on question, I have been > unsuccessful getting the fcast command to work. I have tried > incorporating it into the original forvalue step and doing a separate > forvalue step but neither works. > > . forvalues xticker=1/`r(max)'{ > . var r ep mom if xticker==`xticker' > .} > > Works fine, however; when I do the following: > > . forvalues xticker =1/`r(max)'{ > . fcast compute f_, step(3) if xticker==`xticker' > .} > > I get the following error: > > Invalid syntax r(198) > > I need to perform the var step first and then I can use the fcast > command. Also, to address your question on collating the results - I > will upload the xtickers, forecasted values (f_r), dates into another > software package to run backtests on how well the forecasted values > perform in a portfolio selection process. > > > * > * 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/

**References**:**st: Foreach Command in Panel Data***From:*"Degas Wright" <dwright@cornerstoneadvice.com>

**st: RE: Foreach Command in Panel Data***From:*Nick Cox <n.j.cox@durham.ac.uk>

**st: RE: RE: Foreach Command in Panel Data***From:*Nick Cox <n.j.cox@durham.ac.uk>

**st: RE: RE: RE: Foreach Command in Panel Data***From:*"Degas Wright" <dwright@cornerstoneadvice.com>

**st: RE: RE: RE: RE: Foreach Command in Panel Data***From:*Nick Cox <n.j.cox@durham.ac.uk>

**st: RE: RE: RE: RE: RE: Foreach Command in Panel Data***From:*"Degas Wright" <dwright@cornerstoneadvice.com>

**st: RE: RE: RE: RE: RE: RE: Foreach Command in Panel Data***From:*Nick Cox <n.j.cox@durham.ac.uk>

**st: RE: RE: RE: RE: RE: RE: RE: Foreach Command in Panel Data***From:*"Degas Wright" <dwright@cornerstoneadvice.com>

**st: RE: RE: RE: RE: RE: RE: RE: RE: Foreach Command in Panel Data***From:*Nick Cox <n.j.cox@durham.ac.uk>

**st: RE: RE: RE: RE: RE: RE: RE: RE: RE: Foreach Command in Panel Data***From:*"Degas Wright" <dwright@cornerstoneadvice.com>

**Re: st: RE: RE: RE: RE: RE: RE: RE: RE: RE: Foreach Command in Panel Data***From:*Steve Samuels <sjsamuels@gmail.com>

- Prev by Date:
**Stata 12 wish list: mixed model negative binomial** - Next by Date:
**Re: st: RE: RE: RE: RE: RE: RE: RE: RE: RE: Foreach Command in Panel Data** - Previous by thread:
**Re: st: RE: RE: RE: RE: RE: RE: RE: RE: RE: Foreach Command in Panel Data** - Next by thread:
**Re: st: RE: RE: RE: RE: RE: RE: RE: RE: RE: Foreach Command in Panel Data** - Index(es):