Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Richard Williams <richardwilliams.ndu@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: prvalue and loop rest(grmean) |

Date |
Thu, 27 Oct 2011 09:03:08 -0500 |

At 04:50 AM 10/27/2011, Tobias Schlager wrote:

Dear List, I have a question regarding following problem, it would be amazing if anybody knows a solution. I am using prvalue to estimate the difference in the probability between 2 situations. However, the function is nonlinear (cubic) and I implemented a loop to do that. My problem now is that rest(grmean) is not working with the loop, does anybody know by any chance a work-around?

I wonder if life wouldn't be a lot easier if you used the -margins- command.

. which prvalue c:\ado\plus\p\prvalue.ado *! version 2.5.4 2010-03-26

Here is what I tried so far by hand: logit y z x v w a b b^2 b^3 c c^2 c^3, robust matrix brisk_1 = J(11,4,.) matrix colnames brisk_1 = x dc1 dc1LB dc1UB prvalue, x(a=0 b=-5 b^2=25 b^3 =-125) rest(grmean) save label(single) prvalue, x(a=1 b=-5 b^2=25 b^3=-125) rest(grmean) diff label(multiple) matrix brisk_1[1,1] = -5 matrix brisk_1[1,2] = pepred[6,2] matrix brisk_1[1,3] = pelower[6,2] matrix brisk_1[1,4] = peupper[6,2] prvalue, x(a=0 b=-4 b^2=16 b^3=-64) rest(grmean) save label(single) prvalue, x(a=1 b=-4 b^2=16 b^3=-64) rest(grmean) diff label(multiple) matrix brisk_1[2,1] = -4 matrix brisk_1[2,2] = pepred[6,2] matrix brisk_1[2,3] = pelower[6,2] matrix brisk_1[2,4] = peupper[6,2] prvalue, x(a=0 b=-3 b^2=9 b^3=-27) rest(grmean) save label(single) prvalue, x(a=1 b=-3 b^2=9 b^3=-27) rest(grmean) diff label(multiple) matrix brisk_1[3,1] = -3 matrix brisk_1[3,2] = pepred[6,2] matrix brisk_1[3,3] = pelower[6,2] matrix brisk_1[3,4] = peupper[6,2]

------------------------------------------- Richard Williams, Notre Dame Dept of Sociology OFFICE: (574)631-6668, (574)631-6463 HOME: (574)289-5227 EMAIL: Richard.A.Williams.5@ND.Edu WWW: http://www.nd.edu/~rwilliam * * 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: prvalue and loop rest(grmean)***From:*Tobias Schlager <tobias.schlager@unisg.ch>

- Prev by Date:
**RE: st: moderated mediation model with panel data** - Next by Date:
**st: New version of -punaf- on SSC** - Previous by thread:
**st: prvalue and loop rest(grmean)** - Next by thread:
**st: on counting and fractions in stata** - Index(es):