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: Marginal Effects using subsetted data |

Date |
Sun, 31 Oct 2010 19:37:18 -0500 |

At 02:54 PM 10/31/2010, MOSTARDO, NICK wrote:

Hello, 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)) mfx2, nolog } }

------------------------------------------- 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: Marginal Effects using subsetted data***From:*"MOSTARDO, NICK" <MOSTARDO@mailbox.sc.edu>

- Prev by Date:
**st: changing estimated parameters for new prediction** - Next by Date:
**re: st: changing estimated parameters for new prediction** - Previous by thread:
**st: Marginal Effects using subsetted data** - Next by thread:
**re: st: Marginal Effects using subsetted data** - Index(es):