Statalist


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

Re: st: Jackknife and standard error in NEGBIN model


From   Marc Philipp <marcphilipp@ymail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Jackknife and standard error in NEGBIN model
Date   Wed, 6 May 2009 09:51:08 -0700 (PDT)

Dear all,

I am still trying to understand how the -jackknife:- command computes the standard errors of the parameters. 
I made some progress, but I still have a problem that is puzzling me. Actually, I tried to replicate these standard
errors using the method outlined in Miller (1974), which is based on Tukey (1958). According to Stata user
guide, this is the method implemented in Stata.

However, I don't manage to get the same standard errors. I send you my output below, where you can see how I
tried to replicate the results. You can see that the Jackknifed parameters are exactly the same, but the standard 
errors produced by the -jackknife:- command are smaller than those I computed. They should be the same.
Am I making a mistake or is Stata using another method to compute these standard errors?

Many thanks in advance for your support!

Best regards,
Marc


. jackknife _b[x] e(delta), cluster(tt) saving(jack, replace): nbreg y x d*, disp(c) nocons
(running nbreg on estimation sample)

Jackknife replications (3)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
...

Jackknife results                               Number of obs      =       300
                                                Number of clusters =         3
                                                Replications       =         3

      command:  nbreg y x d*, disp(c) nocons
        _jk_1:  _b[x]
        _jk_2:  e(delta)
          n():  e(N)

------------------------------------------------------------------------------
             |              Jackknife
             |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       _jk_1 |   1.013864   .1062226     9.54   0.011     .5568252    1.470903
       _jk_2 |   1.362775   .0625554    21.79   0.002     1.093621    1.631929
------------------------------------------------------------------------------
 
. matrix bet = e(b)
. matrix list e(b_jk)

e(b_jk)[1,2]
        _jk_1      _jk_2
y1  1.0350594  2.6554469

. use jack.dta, clear
(jackknife: nbreg)

. gen beta_i = 3*bet[1,1]-2*_jk_1
. gen delta_i = 3*bet[1,2]-2*_jk_2
. su beta_i delta_i

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
      beta_i |         3    1.035059    .1839829   .8623033   1.228518
     delta_i |         3    2.655447     .108349   2.582983   2.780004





----- Original Message ----
From: Marc Philipp <marcphilipp@ymail.com>
To: statalist@hsphsun2.harvard.edu
Sent: Wednesday, May 6, 2009 10:00:04 AM
Subject: Re: st: Jackknife and standard error in NEGBIN model

Dear Jeff,

Many thanks for your very clear explanation! Now I understand why the two reported standard errors are different. You are right I should use method (1) since I am interested in the jackknife standard error of delta.

Many thanks again, your help is very valuable!

Best regards,
Marc



----- Original Message ----
From: "Jeff Pitblado, StataCorp LP" <jpitblado@stata.com>
To: statalist@hsphsun2.harvard.edu
Sent: Tuesday, May 5, 2009 1:46:12 PM
Subject: Re: st: Jackknife and standard error in NEGBIN model

Marc Philipp <marcphilipp@ymail.com> is using the -jackknife:- prefix command
with -nbreg-, and asks why the reported standard errors differ for the 'delta'
parameter between two different -jackknife:- specifications:

> I have a problem with the jackknife command. Hopefully there are some
> experienced users who will be able to help me. I am estimating a negative
> binomial model (NEGBIN 1), regressing a count variable y on a continuous
> variable x and on some other control variables z1, z2, ... 
> 
> Since I am only interested in the parameter of x and in the overdispersion
> parameter delta, I specified the command in this way:
> 
> jackknife _b[x] e(delta), cluster(t): nbreg y x z*, dispersion(constant)
> nocons
> 
> However, I observed that if I specify the command in this way, without
> collecting the two parameters I am interested in:
> 
> jackknife, cluster(tt): nbreg y x z*, dispersion(constant) nocons,
> 
> something strange happens: the estimated parameters are exactly the same,
> but the jackknife standard error of delta is completely different, much
> higher than in the previous case, whereas the jackknife standard error of
> b[x] is exactly the same.
> 
> I read the Stata user guide and scanned the web to find some hints, but
> unsuccessfully. I don't understand why the standard error of the
> overdispersion parameter is so different, and don't know which command I
> should use.
> 
> Have you already encountered such a problem with the jackknife command?
> 
> Many thanks in advance for your help!

Marc is using -jackknife:- in the following two ways

(1)    . jackknife _b[x] e(delta), cluster(tt): nbreg y x z*, disp(c) nocons

(2)    . jackknife, cluster(tt): nbreg y x z*, disp(c) nocons

and wants to know why the standard error for 'delta' is bigger in (2) than in
(1).

In (1), -jackknife:- works with -e(delta)- directly; where -e(delta)- is
generated by

    ereturn scalar delta = exp(_b[/lndelta])

so the reported standard error comes from the Jackknife replication method.

In (2), -jackknife:- works with -_b[/lndelta]- (the natural log of 'delta')
directly, then uses a standard transformation result to get the standard error
of 'delta' (coincidentally, this transformation is typically known as the
delta-method and has nothing special to do with our 'delta').  Thus the
standard error for the reported value of 'delta' in (2) is computed as

    abs(_b[/lndelta])*SE(_b[/lndelta])

where 'SE(_b[/lndelta])' was computed via the Jackknife replication method.

If Marc really meant to compute the jackknife standard error of 'e(delta)',
then he should use (1).

Stata always uses the delta-method for computing standard errors for derived
ancillary parameters like 'delta'.

--Jeff
jpitblado@stata.com
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



      
*
*   For searches and help try:
*  http://www.stata.com/help.cgi?search
*  http://www.stata.com/support/statalist/faq
*  http://www.ats.ucla.edu/stat/stata/



      
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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