Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: marginal effects for each variable and each observation


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: marginal effects for each variable and each observation
Date   Tue, 12 Dec 2006 14:14:54 -0500

menale kassie--
In a linear regression model, the marginal effects of each variable
are the same for each observation.  Perhaps you have in mind including
nonlinearities in some RHS var X, and modeling the marginal effect of
X for each observation?  Like so:

sysuse auto, clear
g mp2=mpg^2
g tu2=tur^2
g le2=len^2
reg pr mp* le* tu*
foreach v in mpg tur len {
local sq=substr("`v'",1,2)+"2"
gen mfx_`v'=_b[`v']+2*_b[`sq']*`v' if e(sample)
}
su mfx*
mfx

On 12/12/06, menale kassie <[email protected]> wrote:
Hi everyone,

I was estimating fixed effects linear regression model and would like to estimate the marginal effects of each variable and each observation. I tried to browose commands from Statalist archives but couldn't be able to find a command which does this. Does any one know of the command to solve this problem.?

Thanks,
Menale
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index