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 |
"Alexander M. Jais" <[email protected]> |

To |
[email protected] |

Subject |
Again the requrest: SIMULATION TO INTERPRET AND PRESENT LOGIT RESULTS without formatting - hopefully looks better |

Date |
Thu, 01 Mar 2012 12:34:27 +0100 |

Dear Statalisters,

I ve the following issue:

oModeration_ PsychDxMeansD: Psychic Distance times Means-Driven · Question: * In general I want to graph figures 2 and 3 in Zellner 2009 (pls see link for source:

How do I code the Interaction Variable and Independent Variable, which are NOT binary – the explanation in Zellner shows only the binary interaction term (see lines 3, 10, … in Do file below; based on Zellner 2009, also attached, see pages 21-23) ? * Why is X replaced = .01 (in line 7)? * Why is in line 8 all independent variables set to zero? Do I also need to do that? My current Do-Files looks like this: 1. set seed 9999

3. foreach var in X Y0 Y1 Y0lb Y1lb Y0ub Y1ub dY dYlb dYub { 4.gen `var' = . 5. } 6. forvalues obs = 1(1)18 { 7. replace X = .01*(`obs'+1) in `obs' 8. setx 0 9. setx Means-Driven .01*(`obs'+1) 10. foreach as_lev in 0 1 { 11.setx PsychicDistance `as_lev' PsychDxMeansD `as_lev'*.01*(`obs'+1) 12.simqi, genpr(Y`as_lev'_tmp) prval(1) 13.sum Y`as_lev'_tmp, meanonly 14.replace Y`as_lev' = r(mean) in `obs' 15._pctile Y`as_lev'_tmp, p(2.5, 97.5) 16.replace Y`as_lev'lb = r(r1) in `obs' 17.replace Y`as_lev'ub = r(r2) in `obs' 18.} 19.gen dY_tmp = Y1_tmp - Y0_tmp 20.sum dY_tmp, meanonly 21.replace dY = r(mean) in `obs' 22._pctile dY_tmp, p(2.5,97.5) 23.replace dYlb = r(r1) in `obs' 24.replace dYub = r(r2) in `obs' 25.drop *_tmp 26. }

MANY THANKS for advice highly appreciated! All the best, Alex * * 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/

**Follow-Ups**:**Re: Again the requrest: SIMULATION TO INTERPRET AND PRESENT LOGIT RESULTS without formatting - hopefully looks better***From:*David Hoaglin <[email protected]>

**Re: Again the requrest: SIMULATION TO INTERPRET AND PRESENT LOGIT RESULTS without formatting - hopefully looks better***From:*[email protected] (Brendan Halpin)

- Prev by Date:
**st: RE: code for dynamic programming** - Next by Date:
**Re: Again the requrest: SIMULATION TO INTERPRET AND PRESENT LOGIT RESULTS without formatting - hopefully looks better** - Previous by thread:
**st: code for dynamic programming** - Next by thread:
- Index(es):