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: Marginsplot on backtransformed data

From   Ulrich Kohler <>
Subject   Re: st: Marginsplot on backtransformed data
Date   Thu, 19 Dec 2013 08:42:28 +0100

Here is a solution that works reasonably well (using a log transform).

. use, clear
. gen logincome = log(income)
. reg lsat logincome i.mar
. margins, at(logincome=(6(.1)10))
. matrix at = r(at)
. parmest, bmat(r(b)) vmat(r(V)) fast
. svmat at
. gen x = exp(at1)
. tw || rarea min95 max95 x || line estimate x

data1.dta is the prime example data set of Kohler/Kreuter "Data Analysis Using Stata", published by Stata Press, and -parmest- is uswer-written by Roger Newson and available from SSC:

. ssc install parmest

Many regards


Am 19.12.2013 07:58, schrieb Daniel Herbert Opi:
Hi All,

I am using the marginsplot function to plot graphs that take into
account adjustments I have carried out following a regression
analysis. Since my regression analysis contains data that has been
normalised by square root transformation, the plots are not that
easily interpretable. Is there a way to plot the same graphs but
somehow tell Stata/marginsplot to use back-transformed results? And
does the margins function store predictions that can be accessed?

I am using Stata 13 and the following are examples of commands I am using:

regress squareroot_transformed_variable i.categorical1 i.categorical2

margins categorical1


Kind Regards
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index