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 |
Hagen von Hermanni <[email protected]> |

To |
[email protected] |

Subject |
st: bootstrapping 95%CIs through a loop! |

Date |
Mon, 01 Aug 2011 12:40:27 +0200 |

b12 is the independent var (goes from 1 to 4)

Please help me! foreach nvar in ic1a { foreach mvar in b12 { *gen indicator variables gen tc4=1 if split==2 & `nvar'>=4 replace tc4=0 if split==2 & `nvar'<4 gen tc3=1 if split==2 & `nvar'>=3 replace tc3=0 if split==2 & `nvar'<3 gen tc2=1 if split==2 & `nvar'>=2 replace tc2=0 if split==2 & `nvar'<2 gen tc1=1 if split==2 & `nvar'>=1 replace tc1=0 if split==2 & `nvar'<1 gen bc3=1 if split==1 & `nvar'>=3 replace bc3=0 if split==1 & `nvar'<3 gen bc2=1 if split==1 & `nvar'>=2 replace bc2=0 if split==1 & `nvar'<2 gen bc1=1 if split==1 & `nvar'>=1 replace bc1=0 if split==1 & `nvar'<1 logit tc4 `mvar' predict pt4 gen p4=pt4 logit tc3 `mvar' predict pt3 logit bc3 `mvar' predict bt3 gen p3=pt3-bt3 logit tc2 `mvar' predict pt2 logit bc2 `mvar' predict bt2 gen p2=pt2-bt2 logit tc1 `mvar' predict pt1 logit bc1 `mvar' predict bt1 gen p1=pt1-bt1 egen `nvar'`mvar'= rowtotal(p1 p2 p3 p4) drop tc4 - p1 } } Many Thanks and kind regards Hagen * * 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: Standard error of the forecast** - Next by Date:
**st: No valid instruments for system GMM** - Previous by thread:
**st: Standard error of the forecast** - Next by thread:
**st: No valid instruments for system GMM** - Index(es):