As I mentioned in the beginning of my answer: 3D graphs are not appropriate for your problem, so no.
-
Login or Register
- Log in with
webuse nlswork, clear xtreg ln_wage c.age##c.hours margins, at(age = (15(5)40) hours = (40(10)80)) marginsplot, xdimension(hours)
sysuse auto, clear //RUN YOUR REGRESSION regress length c.headroom##c.trunk //STORE THE RESULTS est sto regression //DEFINE HIGH AND LOW VALUES BASED ON +-1SD FROM THE MEAN OF THE ESTIMATED SAMPLE foreach v of var headroom trunk { su `v' if e(sample) local low_`v'=r(mean)-r(sd) local high_`v'=r(mean)+r(sd) } // LOAD BACK YOUR RESULTS est restore regression // CALCULATE THE MARGINAL PREDICTIONS margins , at(headroom=(`low_headroom' `high_headroom') trunk = (`low_trunk' `high_trunk')) //PLOT THE RESULTS marginsplot , title("") ylabel( , angle(horizontal) nogrid) noci
sysuse auto, clear //RUN YOUR REGRESSION regress length i.rep78##c.trunk //STORE THE RESULTS est sto regression //DEFINE HIGH AND LOW VALUES BASED ON +-1SD FROM THE MEAN OF THE ESTIMATED SAMPLE su trunk if e(sample) local low_trunk=r(mean)-r(sd) local high_trunk=r(mean)+r(sd) // LOAD BACK YOUR RESULTS est restore regression // CALCULATE THE MARGINAL PREDICTIONS margins rep78, at(trunk = (`low_trunk' `high_trunk')) //PLOT THE RESULTS marginsplot , title("") xdimension(rep78) ylabel( , angle(horizontal) nogrid) noci
//DEFINE HIGH AND LOW VALUES BASED ON +-1SD FROM THE MEAN OF THE ESTIMATED SAMPLE
su trunk if e(sample)
local low_trunk=r(mean)-r(sd)
local high_trunk=r(mean)+r(sd)
Comment