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, is already up and running.

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

st: re:

From   Christopher Baum <>
To   <>
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

'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

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   |
                              An Introduction to Stata Programming  |
   An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index