* Logistic Regression for US Population Growth * * Keywords: * regression, nonlinear, logistic, linear, graph, us, population, growth * * Description: * We illustrate how to estimate Logistic and Linear Models for US * Population Growth and produce a Graph * * Author(s): * Skif Pankov * * Source: * Damodar N. Gujarati and Dawn C. Porter, Basic Econometrics - 5th Edition * McGraw-Hill International Edition, Chapter 14, Example 14.3 (page 532) * sample 1 38 * Reading the datafile and naming variables read (data_14.3.shd) t y * Initiating nonlinear regression procedure, stating that 1 equation with * 3 coefficients nl 1 / ncoef = 3 * Writing up an equation we would like to estimate - coefficients are named * A, B and C eq y = A / (1+exp(B + C*t)) * Stating the initial values of coefficients - these shall be used as the starting * points in the process of iterative estimation coef A 1 B 1 C 1 end * Generating a log of population size y genr lny = log(y) * Plotting lny against time graph lny t * Running an OLS regression of lny on t, as suggested by the graph ols lny t / rstat stop