Bookmark and Share

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]

st: re:


From   Christopher Baum <kit.baum@bc.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: re:
Date   Sun, 31 Oct 2010 16:35:35 -0400

<>
Nick said

I am running an ordered probit model using data that I wish to subset by
gender and race (both dichotomous measures). I am running the following
commands:

'by gender race, sort: ologit depvar indvars'

At that point, I get the correct output of 4 tables for the proper
combinations of the sorted variables (0,0)(0,1)(1,0)(1,1); however, when
I try to run marginal effects as:

'mfx, predict(p outcome(1))' (my depvar is 3 ordered categories)

I get the error:

'no observations
r(2000);'


clear all
set more off
sysuse auto
drop if rep78==1
su price,mean
g hip = price>r(mean)
forv p=0/1 {
	forv f=0/1 {
		di in r _n "High price==`p', Foreign==`f'"
		oprobit rep78 turn mpg if hip==`p' & foreign==`f', nolog
		mfx, predict(p outcome(#1)) 
	}
}




Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                              An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
   An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index