Maarten,
I want to report the regression equation in my manuscript so the reader can plug in their independent variable values and get the correct estimate. I thought that calculating the difference between the _fracpred_ estimated values and the values estimated using the coefficients from the _fracpoly_ output would be the fastest way to find the "real" constant for reporting purposes. Is there a better (i.e. easier) way? Am I misunderstanding the process?
Chris
----- Original Message ----
From: Maarten buis <[email protected]>
To: [email protected]
Sent: Monday, March 30, 2009 3:09:57 PM
Subject: Re: st: using coefficients from model
You can access the parameter estimates using _b[varname],
but I don't understand why you would want to do this.
Isn't it much easier to just read the manual entry for
-fracpoly-? This extensively documents how the variables
are transformed.
-- Maarten
-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
--- On Mon, 30/3/09, Chris Witte <[email protected]> wrote:
> From: Chris Witte <[email protected]>
> Subject: st: using coefficients from model
> To: [email protected]
> Date: Monday, 30 March, 2009, 8:55 PM
> I am using stata 9.2. I would like to know how to call
> the coefficients from the estimation results matrix e(b) and
> use them in an equation. For example, if my matrix e(b)
> has values for "_cons" and coefficient
> "test", I would like to calculate the answer to an
> equation y = [_cons] + x*[test]. How can I do this?
>
> The reason why I want to do this is because I am trying to
> find the value _fracpoly_ adjusts its estimates by. If I
> use this output from my _fracpoly_ estimation:
>
> study1twsg Coef. Std. Err.
> t P>t [95% Conf. Interval]
> Itemp__1 15093.12 4454.121 3.39
> 0.012 4560.802 25625.45
> Itemp__2 -10666.18 3136.84 -3.40
> 0.011 -18083.63 -3248.734
> Itemp__3 1945.114 569.9302 3.41
> 0.011 597.4436 3292.785
> _cons .0053322 .0008244 6.47
> 0.000 .0033828 .0072815
> Deviance: -113.24. Best powers of temp among 164 models
> fit: -2 -2 -2.
>
> and I plug in these coefficients with my 'x'
> having a value of 25, my linear regression equation for
> predicting y is:
>
> y=.0053322+(15093.12*25^-2)+(-10666.18*25^-2*log(25))+1945.114*25^-2*(log(25))^2
>
> However, this equation does not yield the same value as
> _predict_ (or _fracpred_), and this is because fracpoly
> secretly adjusts its constant. If I can calculate the
> answer to this equation and put it into a variable, I can
> then find the difference between this variable and the value
> that _fracpred_ gives.
>
> Thank you for your help. Hopefully this isn't too
> confusing.
>
> Chris
>
>
>
>
>
> *
> * 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/