Statalist


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

st: AW: RE: AW: FW: Transformation of SE


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: RE: AW: FW: Transformation of SE
Date   Wed, 1 Apr 2009 11:05:43 +0200

<> 

So far, you have not employed the capabilities of -predictnl-. The result
you get from your code is the same as the one you would get from -predict-.
See the example below...

*************
sysuse auto, clear
gen lnprice=log(price)
reg lnprice we tr tu
predict pred
predictnl phat= predict(), ci(lb ub)
*both solutions are equal
compare phat pred
*here is a non-linear prediction
predictnl expphat= exp(xb()), ci(lbexp ubexp)
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Loncar, Dejan
Gesendet: Mittwoch, 1. April 2009 10:49
An: [email protected]
Betreff: st: RE: AW: FW: Transformation of SE 

Thank you Martin, 

This works

predictnl phat= predict(), ci(lb ub)

I suppose that I need to do antilog for both, predicted values and lb and
ub?

Kind regards,
Dejan

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: 01 April 2009 10:04
To: [email protected]
Subject: st: AW: FW: Transformation of SE 


<> 

Take a look at

*************
help predictnl
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Loncar, Dejan
Gesendet: Mittwoch, 1. April 2009 10:01
An: [email protected]
Betreff: st: FW: Transformation of SE 

Dear All,

 I run regression and used a log transformation to normalize the
distribution of variables and meet other regression assumptions. 


I got predicted values that I need to transform (antilog) using Duan's
Smearing Retransformation and stdp standard error of the linear
prediction xb which a I would use eventually to calculate ub and lb.

reg lnX lnY lnZ
predict yhatraw
predict SE, stdp
gen YHTSMEAR=(exp(yhatraw))*meanres

My question is what to do with SE. How can I transform it after I do
antilog of predicted values using Duan's Smearing Retransformation? 



Thank you in advance 



Dejan



*
*   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/


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index