Bookmark and Share

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]

st: prvalue and loop rest(grmean)


From   Tobias Schlager <[email protected]>
To   [email protected]
Subject   st: prvalue and loop rest(grmean)
Date   Thu, 27 Oct 2011 11:50:03 +0200

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? 

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]

Best, 
Tobias
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index