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 on April 23, and its replacement, is already up and running.

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

Re: st: nlcom question

From   Austin Nichols <>
Subject   Re: st: nlcom question
Date   Thu, 4 Mar 2010 21:46:27 -0500

john metcalfe <>:
The calculations will all be easier if you run a -poisson- regression
of y on X instead of OLS regression of ln(y) on X, since the
predictions of mean y given X no longer include an estimate of the
variance of error terms. To replicate -margins- output, you can simply
-predict- after you -replace- X variables with appropriate patterns as
in e.g.
and if you wrap all the predictions and -summarize- commands in a
-program-, you can bootstrap the whole thing, or you can use the delta
method to calculate SEs by hand.  See also
or -margeff- (use -findit margeff- to find the latest version).

On Thu, Mar 4, 2010 at 4:23 PM, john metcalfe <> wrote:
> Thanks, Stas. How could I replicate Stata 11's -margins- command using Stata
> 10? (I went ahead and ordered the upgrade but it won't arrive until next
> week.)
> Thanks,
> John
> On Wed, Mar 3, 2010 at 7:46 PM, Stas Kolenikov <> wrote:
>> If the distributions of the dependent variable are the same for two levels
>> of the categorical factor, then they will be the same no matter whether you
>> transformed them or you did not. Hence it suffices to use -test- rather
>> than
>> -nlcom-. The latter will be answering a more subtle question of whether the
>> means are the same (you implicitly put zeroes for all other variables,
>> which
>> may or may not be appropriate); you still may have differences in variance,
>> skewness, kurtosis, etc. between groups even if you find the means to be
>> the
>> same.
>> Stata 11 has new -margins- command; have you looked at it?
>> On Wed, Mar 3, 2010 at 9:31 PM, john metcalfe <
>> >wrote:
>> > Dear Statalist,
>> > I have a simple question I hope someone can help me with.
>> > I am using OLS with robust variance estimators to model a continuous,
>> > log-transformed DV ranging from 0 to 10 in increments of 0.01 (this is
>> > an immunologic test in common use in the U.S.). My goal is to
>> > determine whether or not there are differences in this test
>> > performance according to a categorical independent variable (rax, 4
>> > levels) with an interaction term (nt, 3 levels) and other categorical
>> > covariates, as below:
>> >
*   For searches and help try:

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