Introduction to Nonlinear Models

There are many problems where the response variable and the predictors are related through a known nonlinear function, which involves the fitting of a nonlinear regression model by least squares.

The resulting normal equations are not linear and, in general, difficult to solve. The nonlinear estimation usually requires heavy iterative calculations. Therefore, a good computer software offers a way of measuring accuracy, reliability and robustness of nonlinear models.

Nonlinear models are useful in many fields, such as chemistry, biology, politics and other sciences. Perhaps the best known category of nonlinear models are growth models. In these cases nonlinear growth curves that follow a specific nonlinear function over time enable to model complex developmental patterns. The type of model that may best fit to the data can be determined by viewing a plot of the data over time.

Tableau Software

Tableau has been changing the way data is presented. With a truly user friendly interface, you can create interactive visualizations and publish them to the internet. If you prefer a document, a .pdf can be also automatically generated.

Tableau is based in three easy steps: (1) Open a file (2) Create your analysis (3) Publish your dashboard.

Tableau supports many different types of files such as .xls, .txt or .csv.  After opening a file, Tableau will automatically identify which fields are Dimensions, and which ones are Measures. Definitely, it is a helpful functionally that Tableau has.

Tableau Desktop is the full Tableau version. The Personal Edition costs  999 USD. Tableau also offers the free Tableau Public which allows simple analysis in a friendly web-based interface. 

You can aquire Tableau here: http://www.tableausoftware.com/

How to input Excel data into SAS?

There are many different ways of importing Excel file into SAS Enterprise Guide. This post is going to show, probably the easiest way of doing so.

In our example, we have the following data. The file is called “Book1.xls” and has three worksheets: “to do”, “data01” and “data02”. We want to import the sheet “data02” (see below), that has three fields “Name”, “State” and “Age”.


To import the data, open the SAS application and, in the File menu, choose the item Import Data:


Find the Excel file in your computer.


After choosing the file, SAS will open the Import Data wizard in four steps. First, it describes the source data file and gives an option to choose where the file is going to be saved in the SAS Server.
Chick on Browse to select another location (library).


Remind that our file has three sheets. We are going to use the sheet “data02”. Also, in our data, the first row contains the field names. All this info is defined in the next window, which is the most important window in the Import Data wizard.


Third window defines the field attributes. Here SAS, by default, does a really good job recognizing the fields’ formats. In case you want to change something, chick on Modify.
























In the last window, usually no inputs are required. Just click on Finish.


The data is going to be available in the library specified. The Output Data tab also shows the imported data.





Deterministic versus Stochastic

Those words are frequently used in Statistics, however most people have some problems with their definitions.

Deterministic processes are those where the results are not going to change, given the same starting condition. Results do not have uncertainty. Optimization is a case of deterministic methods.

Stochastic are clearly Statistics models, where there is some sort of indeterminacy.  There are several directions in which the process may evolve. Simulation is an example of stochastic processes.

Introduction to autocorrelation

Time series basically refer to time oriented data. It is applicable in many cases, such as in economics and weather forecasting.

The assumption of independent errors that we have when analyzing non- time oriented data is usually appropriated for time series data. Errors in time series can have what we call autocorrelation:  errors are no longer independent.

The errors can be positively correlated, which is more common, or negative correlated.  In positively correlated series if one variable increase the other will increase, and if one decrease, the other will also decrease. The correlation is in the same direction.  In contrast, negative autocorrelation is characterized by opposite tendencies between the variables.

The presence of autocorrelation has several implications in our models:
  1.  Regression coefficients are no longer minimum-variance.
  2. In case of positively correlated errors we can have an estimate of the variability that is underestimated
  3. Hypothesis tests and confidence intervals are no longer exact: confidence and prediction intervals they are shorter than they really should be, and hypothesis tests may indicate that some predictors are important to the model when they really are not.

There are three main approaches to remedy the autocorrelation problem:
  1. Missing predictors can be identified and included in the model
  2. Generalized least squares can be used in case the autocorrelation structure is known
  3. Use a model that specifically incorporates the autocorrelation structure