That's right. Even though packages make many things more efficient and simplifies the tasks most of the time, sometimes as in my case they do not produce fully the appropriate answer.
-------- Original-Nachricht --------
> Datum: Fri, 7 Nov 2008 17:39:55 +0100
> Von: "Martin Weiss" <[email protected]>
> An: [email protected]
> Betreff: RE: RE: RE: RE: st: RE: extract t-values
> Note that most replies point toward -parmest-, Bastian, so the case for
> doing this by hand is getting weaker by the minute. Still, it can make
> sense
> to go back to the roots and observe where all the stuff that fancy
> packages
> do automatically actually comes from...
>
>
> HTH
> Martin
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Bastian
> Steingros
> Sent: Friday, November 07, 2008 5:28 PM
> To: [email protected]
> Subject: Re: RE: RE: RE: st: RE: extract t-values
>
> "So e(df_r) is available after -reg, robust-, right?"
>
> Obviously, it works. I compared my self-made results with the regression
> output and the p-values are totally identical.
> (I do not know why that e(df_r) did not work before.)
>
> Do you think it should not be working? Using e(df) does not create any
> p_values.
>
> By the way, I have a question to e(.) in general .
> How can I put digits captured by the command e(.) into my dataset?
> I mean, can I create for example : gen degree_freedom=e(df_r) ? If so,
> how?
>
> B
>
>
> -------- Original-Nachricht --------
> > Datum: Fri, 7 Nov 2008 13:02:59 +0100
> > Von: "Martin Weiss" <[email protected]>
> > An: [email protected]
> > Betreff: RE: RE: RE: st: RE: extract t-values
>
> > So e(df_r) is available after -reg, robust-, right?
> >
> >
> > HTH
> > Martin
> >
> >
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of Bastian
> > Steingros
> > Sent: Friday, November 07, 2008 12:44 PM
> > To: [email protected]
> > Subject: Re: RE: RE: st: RE: extract t-values
> >
> > Hi Martin,
> > voicing concern might be logical when looking at my descriptions of the
> > problem. I think I should have detailed it.
> > However, the command you last emailed is exactly what I searched!!!
> >
> > Many thanks!
> >
> > have a nice day
> > B
> >
> >
> >
> >
> >
> > -------- Original-Nachricht --------
> > > Datum: Fri, 7 Nov 2008 12:20:04 +0100
> > > Von: "Martin Weiss" <[email protected]>
> > > An: [email protected]
> > > Betreff: RE: RE: st: RE: extract t-values
> >
> > > I tried to make my example as general as possible, hence the
> > "complicated"
> > > syntax and the use of M.Buis` -ssc d indeplist-. You can shrink this
> > > syntax
> > > if all you want is a calculation for one of the covariates, i.e.
> > >
> > > **************
> > > sysuse auto, clear
> > > reg p w f r, robust
> > > gen tweight = _b[weight]/_se[weight]
> > > gen pweight = 2*ttail(e(df_r),abs(_b[weight]/_se[weight]))
> > > **************
> > >
> > > I do not endorse your strategy, and others have voiced concerns as
> well,
> > > but
> > > if you absolutely want it...
> > >
> > >
> > > HTH
> > > Martin
> > >
> > >
> > > -----Original Message-----
> > > From: [email protected]
> > > [mailto:[email protected]] On Behalf Of Bastian
> > > Steingros
> > > Sent: Friday, November 07, 2008 12:12 PM
> > > To: [email protected]
> > > Subject: Re: RE: st: RE: extract t-values
> > >
> > > Yes I have.
> > >
> > > I think using this command could be helpful:
> > > di in red "p-value: " %5.4fc
> > > 2*ttail(e(df_r),abs(_b["`indep'"]/_se["`indep'"])) _n(2)
> > >
> > > But, I do not fully understand how to incorporate this command in my
> > > dofile.
> > >
> > > I would like to program *gen p_value=...*. Is something of that
> > mentioned
> > > above fit to do so?
> > > I have the t-values for each year.
> > > I guess it must be *gen p_value=2*ttail(e(df_r), abs(t_value))... but
> I
> > > then
> > > have a syntax problem to deal with... Maybe e(df_r) does not function
> > when
> > > using reg ... , robust
> > >
> > > Or is it not possible to calculate the p-values by hand in stata ?
> > >
> > > Hope I made my problem clear
> > >
> > > B
> > >
> > >
> > > -------- Original-Nachricht --------
> > > > Datum: Fri, 7 Nov 2008 11:11:17 +0100
> > > > Von: "Martin Weiss" <[email protected]>
> > > > An: [email protected]
> > > > Betreff: RE: st: RE: extract t-values
> > >
> > > > Are you sure you have read through all messages in this thread? You
> > > might
> > > > have missed
> > > >
> > > > http://www.stata.com/statalist/archive/2008-11/msg00234.html
> > > >
> > > >
> > > >
> > > > HTH
> > > > Martin
> > > >
> > > > -----Original Message-----
> > > > From: [email protected]
> > > > [mailto:[email protected]] On Behalf Of Bastian
> > > > Steingros
> > > > Sent: Friday, November 07, 2008 11:09 AM
> > > > To: [email protected]
> > > > Subject: Re: st: RE: extract t-values
> > > >
> > > > Hi Martin hi everybody
> > > >
> > > > you are right, parmest simplifies it greatly, but is there another
> way
> > > to
> > > > put the p-values directly into my data set?
> > > > I mean, using something like gen t=_b[.]/_se[.] makes stata write
> the
> > > > t-statistics in the *same* dataset where the other variables already
> > > are.
> > > > The thing is I run many regressions. My dataset consists of data
> from
> > > 1950
> > > > to 1995. I want to run regression for 5-year-time-windows only,
> that
> > > is,
> > > > the first time window is 1950-1955 etc.
> > > > To put all the statistics from the regression table into my dataset
> > > > simplifies my task because I then can reduce my sample to those time
> > > > windows
> > > > where all the regression coefficient are at least significant at the
> > 5%
> > > > level (for example by using: bys window: keep if p_value=<0.05).
> > > >
> > > > That is the reason why I want to calculate the t-values and, in the
> > next
> > > > step, the p-values separately.
> > > >
> > > > Is there a may to calculate p-values after having calculated
> t-values?
> > > >
> > > > Try to give an example of how it looks like in my dataset
> > > > year var1 var2 ... coefficient t_val p_val
> > > >
> > > > 1950 2.98 4.27 --> ????
>
> >
> > > > 1950 2.98 4.27 ---> ????
> > > > ...etc.
> > > >
> > > > Basti
> > > > -------- Original-Nachricht --------
> > > > > Datum: Thu, 6 Nov 2008 17:56:48 +0100
> > > > > Von: "Martin Weiss" <[email protected]>
> > > > > An: [email protected]
> > > > > Betreff: st: RE: extract t-values
> > > >
> > > > > BTW, your -gen- statement is probably not the most expedient way
> to
> > > > > achieve
> > > > > what I assume you want. You might want to look into -local-s or
> > > > -scalar-s
> > > > > for more efficient storage. Or indeed -ssc d parmest- which
> > simplifies
> > > > > this
> > > > > task greatly...
> > > > >
> > > > >
> > > > > HTH
> > > > > Martin
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: [email protected]
> > > > > [mailto:[email protected]] On Behalf Of Bastian
> > > > > Steingros
> > > > > Sent: Thursday, November 06, 2008 5:48 PM
> > > > > To: [email protected]
> > > > > Subject: st: extract t-values
> > > > >
> > > > > Hi Stata users,
> > > > >
> > > > > does anybody know a ansver to this problem:
> > > > >
> > > > > I want to extract the t-values from the table displayed below. To
> > > obtain
> > > > > the
> > > > > coefficients is easy by programming gen coef1=_b[var1]
> > > > >
> > > > > Is there also a command to extract the t-value of var1???
> > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > > > > --
> > > > > dep_var | Coef. Std. Err. t P>|t|
> > [95%
> > > > > Conf.
> > > > > Interval]
> > > > >
> > > >
> > >
> >
> ---------+------------------------------------------------------------------
> > > > > --
> > > > > var1 | -.0074074 .0008079 -9.168 0.000
> -.0090039
> > > > > -.0058109
> > > > > _cons | 4.711111 .2162561 21.785 0.000 4.283786
> > > > > 5.138436
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > > > > --
> > > > >
> > > > > thanks
> > > > >
> > > > > B
> > > > > --
> > > > > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > > > > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> > > > > *
> > > > > * 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/
> > > >
> > > > --
> > > > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > > > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> > > > *
> > > > * 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/
> > >
> > > --
> > > GMX Download-Spiele: Preizsturz! Alle Puzzle-Spiele Deluxe über 60%
> > > billiger.
> > >
> >
> http://games.entertainment.gmx.net/de/entertainment/games/download/puzzle/in
> > > dex.html
> > > *
> > > * 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/
> >
> > --
> > Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit
> allen:
> > http://www.gmx.net/de/go/multimessenger
> > *
> > * 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/
>
> --
> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> *
> * 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/
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
*
* 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/