Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: obtaining confidence interval from -lincom-


From   Tom <tommedema@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: obtaining confidence interval from -lincom-
Date   Sat, 25 May 2013 15:04:16 +0200

Dear list,

My research supervisor told me that I can generate a marginal effects
plot much like the one on page 14 of Brambor et al. (2006). [1]

Note that using marginsplot in Stata 12 does not create such plot.
Therefore my supervisor told me to  do the following:

## code start ##

* regress *
reg g ipr dtflog dtflogipr i.cid, robust

cap drop l_dtf
cap drop l_est
gen l_dtflog = .
gen l_est = .

* lincom *
forval i = 1/61 {
    local dtflog = (`i'-1) / 10

    lincom _b[ipr] + `dtflog' * _b[dtflogipr], level(95)

    * save *
    replace l_dtflog = `dtflog' in `i'
    replace l_est = r(estimate) in `i'

}

line l_est l_dtflog

## code end ##

In short: the regression has two main independent variables ipr and
dtflog and one interaction term of these two variables (dtflogipr).
dtflog ranges from 0 to 6 and is looped through to see the interaction
effect for certain values of dtflog.

I want to make the same graph as Brambor et al. (2006), where both
confidence interval borders being above or below the horizontal axis
indicates a singificant interaction effect.

The only problem so far seems to be that while lincom returns a
confidence interval, when I do -return list- I only see the estimate
in r(estimate), but I cannot retrieve the confidence interval from the
list.

So, how would I retrieve the confidence interval listed in the table
after running -lincom- ?

Tom

[1]: Brambor, Thomas, William Roberts Clark, and Matt Golder.
"Understanding interaction models: Improving empirical analyses."
Political analysis 14.1 (2006): 63-82.
Available from http://localgov.fsu.edu/readings_papers/Research%20Methods/Brambor_et_al_Multipolicative_Interactions.pdf
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index