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 |
Tobias Morville <tobiasmorville@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Several questions regarding xtprobit and margins command |

Date |
Tue, 13 Nov 2012 09:29:14 +0100 |

Hey Nick, and thanks for the anwser on Q#1, and the grammar correction too :-) I run -xtprobit stop_dummy Outcome outcome_lag1 seqEarn seqearn_outcome,re- Where seqEarn goes from 0 to approx 800 (in a very few obs). Only in integers. Outcome is the number of eyes the die shows, and seqearn_outcome is a interaction between seqEarn and Outcome. This adds another question. As seqEarn (their accumulated earnings they get every game round) is a positive monotonically increasing function of Outcome(t-z), is there anything wrong with NOT adding the interactionterm between them? best, Tobias 2012/11/12 Nick Cox <njcoxstata@gmail.com>: > At least, if you are replying to me, know by reading the whole thread > that I was replying to Tobias. > > Nick > > On Mon, Nov 12, 2012 at 7:48 PM, Tim Burnett (ECO) > <Tim.Burnett@uea.ac.uk> wrote: >> Oh, I realise I omitted some commas in the dydx margins commands. >> >> Sorry, >> >> Tim >> -- >> >> Tim Burnett >> PhD Researcher >> Department of Economics & ESRC Centre for Competition Policy >> University of East Anglia >> >> Email: tim.burnett@uea.ac.uk >> Phone: +44 (0) 7793 116 522 >> Skype: timb318 >> ________________________________________ >> From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] on behalf of Tim Burnett (ECO) [Tim.Burnett@uea.ac.uk] >> Sent: 12 November 2012 19:43 >> To: statalist@hsphsun2.harvard.edu >> Subject: RE: st: Several questions regarding xtprobit and margins command >> >> The model is: >> >> probit Y ib2.D i.supplier##i.S i.B##i.supplier i.B##i.S i.S#c.N i.supplier#c.N ib1.income ib1.employment i.children i.gender ib1.education ib2.age >> >> Where N takes the value 1,2,3 or 4, and B takes the value 0 or 1. >> >> margins, dydx(B) at(S=(1 2 3 4) supplier=(1 2 3 4 5 6) N=1 D=3 income=4 employment=1 children=0 gender=0 age=3 education=1) >> >> gives dS/dB, and... >> >> margins, dydx(N) at(S=(1 2 3 4) supplier=(1 2 3 4 5 6) B=1 D=3 income=4 employment=1 children=0 gender=0 age=3 education=1) >> >> gives dS/dN >> >> and for all possible S*supplier combinations: >> >> dS/dB + dS/dN = [margins, at(S=(1 2 3 4) supplier=(1 2 3 4 5 6) N=2 B=1 D=3 income=4 employment=1 children=0 gender=0 age=3 education=1)] - [margins, at(S=(1 2 3 4) supplier=(1 2 3 4 5 6) N=1 B=0 D=3 income=4 employment=1 children=0 gender=0 age=3 education=1)] >> >> But, the problem I have is in finding the standard error associated with the combined (dS/dB + dS/dN) term and I was wondering whether Stata has some way of calculating the standard error associated with the compound effect of a marginal change in several variables. >> >> I hope this makes sense now! >> >> Many thanks for your help! >> >> Tim >> >> -- >> >> Tim Burnett >> PhD Researcher >> Department of Economics & ESRC Centre for Competition Policy >> University of East Anglia >> >> Email: tim.burnett@uea.ac.uk >> Phone: +44 (0) 7793 116 522 >> Skype: timb318 >> ________________________________________ >> From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] on behalf of Nick Cox [njcoxstata@gmail.com] >> Sent: 12 November 2012 18:20 >> To: statalist@hsphsun2.harvard.edu >> Subject: Re: st: Several questions regarding xtprobit and margins command >> >> I'll comment on your problem #1. >> >> The help for -margins- starts >> >> "margins [marginlist] [if] [in] [weight] [, response_options options] >> >> where marginlist is a list of factor variables or interactions that appear >> in the current estimation results." >> >> When you give arguments immediately after the command, the crucial part is >> >> "margins marginlist ... >> >> where marginlist is a list of factor variables or interactions that appear >> in the current estimation results." >> >> So, it would help if you gave the exact and complete -xtprobit- >> command you used. I suspect that the error message will make sense >> when we see the exact model you fitted. >> >> Nick >> >> P.S. "dice" is a strange word even to those for whom English is a >> first language. "dice" is a plural: the singular is "die". One die, >> two dice. >> >> On Mon, Nov 12, 2012 at 2:58 PM, Tobias Morville >> <tobiasmorville@gmail.com> wrote: >> >>> I have a set of questions regarding the margins command, and marginal >>> effects in general. >>> >>> I have a unbalanced paneldataset of 4124 observations, unevenly >>> distributed on 18 subjects. >>> >>> My model is as follows: P(stop) = Outcome outcome_lag1 seqEarn, which >>> im estimating in a RE probit setting with xtprobit command. >>> >>> Outcome: Outcome of a dice in period t. Lies from 1 to 6 >>> Outcome_lag1: Outcome of the dice in period t-1 >>> seqEarn: Accumulated earnings over each game. Drops to 0 if subject >>> chooses to stop, or the dice shows a one. Starts at zero, and can only >>> get more positive as people climb the reward ladder. >>> >>> All of these regressors are significant. >>> >>> Sooo, now the questions begin: >>> >>> 1) If i use -margins Outcome- (followed this guide >>> http://www.stata.com/stata12/margins-plots/), then i get this >>> errormessage: "'Outcome' not found in list of covariates", and that >>> actually is the case for all margins commands, and is my number one >>> headache. >>> >>> The only marginscommand that works, is if i use the -margins, >>> dydx(Outcome outcome_lag1 seqEarn)-, which leads me to my next >>> problem: >>> >>> 2) When i use a -margins, dydx(Outcome outcome_lag1 seqEarn)- my >>> marginal effects are exactly the same as my regression coefficients? >>> >>> If i change the code to -margins, dydx(Outcome outcome_lag1 seqEarn) >>> atmeans- they're the same again..? >>> (So APE = MEM?) >>> >>> Im really confused about this, and i've read the ealier post >>> (http://www.stata.com/statalist/archive/2009-11/msg01517.html), which >>> covers some of the questions i have, but dosen't really anwser them. >>> >>> If i use mfx compute, predict(pu0) they change, but they become very >>> small. And im guess that pu0 means that Im setting the random effects >>> slope to 9, which is a bad idea for my data, as there is quite alot of >>> random variability. >>> >>> 3) If i choose to ignore the fact that my marginal effects are the >>> same as my probit regression coefficients, then im in my next pickle. >>> That my marginal effects are constant. If i plot the predicted >>> probability of stopping the game, over seqEarn, its constant, which >>> suits my data very badly. And im afraid that i've misunderstood >>> something very basic. >>> >>> if i try -margins, dydx(seqEarn) at (Outcome=(2 3 4 5 6)) vsquish- >>> marginal effects are the same over Outcome size... >>> >>> .. and it's basically the same. >>> >>> What i would idealy like to see, is that predicted probability changes >>> both over seqEarn and over Outcome and outcome_lag1 in some systematic >>> way, but right now my newbieness in Stata problemshooting is driving >>> me up the wall. >>> >>> ------ >>> >>> Background (just for the interested): >>> >>> I'm currently working with a dataset of 18 subjects, playing a virtual >>> dicegame for 25 mins while in a fMRI scanner. The dice is random >>> (1-6), and if you roll one, you lose whatever you accumulated this >>> round. It's a balloon kind of thing: How far do people dare to go up >>> the exponential reward ladder, before banking their earnings. > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Several questions regarding xtprobit and margins command***From:*Nick Cox <njcoxstata@gmail.com>

**References**:**st: Several questions regarding xtprobit and margins command***From:*Tobias Morville <tobiasmorville@gmail.com>

**Re: st: Several questions regarding xtprobit and margins command***From:*Nick Cox <njcoxstata@gmail.com>

**RE: st: Several questions regarding xtprobit and margins command***From:*"Tim Burnett (ECO)" <Tim.Burnett@uea.ac.uk>

**RE: st: Several questions regarding xtprobit and margins command***From:*"Tim Burnett (ECO)" <Tim.Burnett@uea.ac.uk>

**Re: st: Several questions regarding xtprobit and margins command***From:*Nick Cox <njcoxstata@gmail.com>

- Prev by Date:
**st: stripplot, separate(): How to control appearance of markers** - Next by Date:
**Re: st: Comparing trend (y) with trend (x) using ordinal logistic regression** - Previous by thread:
**Re: st: Several questions regarding xtprobit and margins command** - Next by thread:
**Re: st: Several questions regarding xtprobit and margins command** - Index(es):