|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: R: Estimating peak points from regressions
From |
"Feiveson, Alan H. (JSC-SK311)" <[email protected]> |
To |
<[email protected]> |
Subject |
st: RE: R: Estimating peak points from regressions |
Date |
Fri, 2 Jan 2009 08:08:48 -0600 |
Pavlos -
Following up Carl's suggestion, you can use -nlcom- to get an estimate and confidence limits for the vlaue of x that maximizes the expected response.
Example:
. gen x2=x*x
. reg y x x2
Source | SS df MS Number of obs = 101
-------------+------------------------------ F( 2, 98) = 54.79
Model | 97.5348065 2 48.7674032 Prob > F = 0.0000
Residual | 87.2210866 98 .890011088 R-squared = 0.5279
-------------+------------------------------ Adj R-squared = 0.5183
Total | 184.755893 100 1.84755893 Root MSE = .9434
------------------------------------------------------------------------------
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x | 10.20187 1.276199 7.99 0.000 7.669291 12.73444
x2 | -11.65837 1.234915 -9.44 0.000 -14.10902 -9.207721
_cons | 5.214455 .2761306 18.88 0.000 4.666483 5.762427
------------------------------------------------------------------------------
. nlcom (-_b[x]/(2*_b[x2]))
_nl_1: -_b[x]/(2*_b[x2])
------------------------------------------------------------------------------
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_nl_1 | .4375341 .0153123 28.57 0.000 .4071473 .4679209
------------------------------------------------------------------------------
Al Feiveson
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlo Lazzaro
Sent: Friday, January 02, 2009 6:32 AM
To: [email protected]
Cc: 'Pavlos C. Symeou'
Subject: st: R: Estimating peak points from regressions
Among other interesting queries, Pavlos wrote:
"I would like to know how I can estimate the peaks for mobile and size"
I suppose you are searching for the turning point equation.
As you are surely alrady aware of, a quadratic function (y=ax^2 + bx) has a maximum or minimum at x=-b/2a. Then, my poor maths stops.
Some days ago Richard Williams pointed out on the list is (beneath reported) link on some very interesting stuff on Nonlinear relationships.
http://www.nd.edu/~rwilliam/stats2/l61.pdf
I am sure that his teaching-notes will be more useful that my scant advice!
Kind Regards and All the Best for the New Year, Carlo
-----Messaggio originale-----
Da: [email protected]
[mailto:[email protected]] Per conto di Pavlos C. Symeou
Inviato: venerdì 2 gennaio 2009 10.29
A: [email protected]
Oggetto: st: Estimating peak points from regressions
Dear Statalisters,
First allow me to wish you a Happy New Year.
I am estimating a regression model where the dependent variable is the number of fixed telephony lines (fixed) regressed on (among others) the number of mobile subscribers (mobile), the square of this variable (mobile_sq), a variable that measures economy size (size), and its square (size_sq). Inclusion of the squares of mobile and size intends to examine whether the relationships between mobile and fixed and/or size and fixed are non-linear. Running the model gives me positive coefficients for mobile and size and negative coefficients for mobile_sq and size_sq. This would imply that the positive effects of the former reach a peak and thereafter the relationship becomes negative specified by their respective squares. I would like to know how I can estimate the peaks for mobile and size. Namely, a) up to which level does mobile telephony go in tandem with fixed telephony; b) what is the economy size that is more conducive to increases in fixed telephony? All variables are co!
ntinuous.
If the estimation of these two peak points is possible algebraically, is there a way to illustrate this graphically?
Best wishes,
Pavlos
*
* 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/