Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

re: st: Marginal Effects using subsetted data

From   Kit Baum <[email protected]>
To   [email protected]
Subject   re: st: Marginal Effects using subsetted data
Date   Sun, 31 Oct 2010 16:37:17 -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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index