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 |
mweberru@students.mail.uni-mannheim.de |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: Simulating time series with if else condition |

Date |
Tue, 21 Feb 2012 22:53:36 +0100 |

Dear Statalist,

I would be really thankful if anyone of you could help me solve my problem. Thanks in advance for your help! Regards, M.Weber Here is the do-file: set seed 75225379 scalar const=0 scalar coeff=0.7 gen u=. gen x=. gen debtissue_sim=. by id: gen debtlevel_sim=. gen debtratio_sim=.

quietly { forvalues i=1/1000 { tsset id fyear replace u=rnormal()

regress debtissue_sim x if fyear==1971{

}

by id: replace debtlevel_sim=0 } else {

} replace debtratio_sim=debtlevel_sim/net_assets post sim (debtissue_sim) (debtissue_sim_at) (debtlevel_sim) (debtratio_sim) } } postclose sim * * 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/

- Prev by Date:
**st: population weights question** - Next by Date:
**RE: st: Which inverter? (was: RE: RE: ivreg2 weak-id statistic and quadratic terms)** - Previous by thread:
**Re: st: Which inverter? (was: RE: RE: ivreg2 weak-id statistic and quadratic terms)** - Next by thread:
**re: st: Simulating time series with if else condition** - Index(es):