Posts Tagged ‘ Data Analysis ’

Reduced models: A way to choose initial parameters for a mixed model

June 27, 2018
By
Reduced models: A way to choose initial parameters for a mixed model

This article describes how to obtain an initial guess for nonlinear regression models, especially nonlinear mixed models. The technique is to first fit a simpler fixed-effects model by replacing the random effects with their expected values. The parameter estimates for the fixed-effects model are often good initial guesses for the [...] The post Reduced models: A way to choose initial parameters for a mixed model appeared first on The DO…

Read more »

Use a grid search to find initial parameter values for regression models in SAS

June 25, 2018
By
Use a grid search to find initial parameter values for regression models in SAS

When you fit nonlinear fixed-effect or mixed models, it is difficult to guess the model parameters that fit the data. Yet, most nonlinear regression procedures (such as PROC NLIN and PROC NLMIXED in SAS) require that you provide a good guess! If your guess is not good, the fitting algorithm, [...] The post Use a grid search to find initial parameter values for regression models in SAS appeared first on…

Read more »

An easy way to make a "Top 10" table and bar chart in SAS

June 4, 2018
By
An easy way to make a "Top 10" table and bar chart in SAS

Years ago, I wrote an article about how to create a Top 10 table and bar chart. The program can be trivially modified to create a "Top N" table and plot, such as Top 5, Top 20, or even Top 100. Not long after the article was written, the developer [...] The post An easy way to make a "Top 10" table and bar chart in SAS appeared first on…

Read more »

Use a fringe plot to visualize binary data in logistic models

May 31, 2018
By
Use a fringe plot to visualize binary data in logistic models

A previous article showed how to use a calibration plot to visualize the goodness-of-fit for a logistic regression model. It is common to overlay a scatter plot of the binary response on a predicted probability plot (below, left) and on a calibration plot (below, right): The SAS program that creates [...] The post Use a fringe plot to visualize binary data in logistic models appeared first on The DO Loop.

Read more »

Decile calibration plots in SAS

May 16, 2018
By
Decile calibration plots in SAS

In my article about how to construct calibration plots for logistic regression models in SAS, I mentioned that there are several popular variations of the calibration plot. The previous article showed how to construct a loess-based calibration curve. Austin and Steyerberg (2013) recommend the loess-based curve on the basis of [...] The post Decile calibration plots in SAS appeared first on The DO Loop.

Read more »

Calibration plots in SAS

May 14, 2018
By
Calibration plots in SAS

A logistic regression model is a way to predict the probability of a binary response based on values of explanatory variables. It is important to be able to assess the accuracy of a predictive model. This article shows how to construct a calibration plot in SAS. A calibration plot is [...] The post Calibration plots in SAS appeared first on The DO Loop.

Read more »

A macro to execute PROC TTEST for multiple binary grouping variables in SAS (and sorting t-test statistics by their absolute values)

In SAS, you can perform PROC TTEST for multiple numeric variables in the same procedure.  Here is an example using the built-in data set SASHELP.BASEBALL; I will compare the number of at-bats and number of walks between the American League and the National League. proc ttest data = sashelp.baseball; class League; var nAtBat nBB; ods […]

Read more »

Order variables in a heat map or scatter plot matrix

May 2, 2018
By
Order variables in a heat map or scatter plot matrix

Order matters. When you create a graph that has a categorical axis (such as a bar chart), it is important to consider the order in which the categories appear. Most software defaults to alphabetical order, which typically gives no insight into how the categories relate to each other. Alphabetical order [...] The post Order variables in a heat map or scatter plot matrix appeared first on The DO Loop.

Read more »

Assign colors in heat maps: A study of married couples and college majors

April 30, 2018
By
Assign colors in heat maps: A study of married couples and college majors

Some say that opposites attract. Others say that birds of a feather flock together. Which is it? Phillip N. Cohen, a professor of sociology at the University of Maryland, recently posted an interesting visualization that indicates that married couples who are college graduates tend to be birds of a feather. [...] The post Assign colors in heat maps: A study of married couples and college majors appeared first on The…

Read more »

A macro to automate the creation of indicator variables in SAS

In a recent blog post, I introduced an easy and efficient way to create indicator variables from categorical variables in SAS.  This method pretends to run logistic regression, but it really is using PROC LOGISTIC to get the design matrix based on dummy-variable coding.  I shared SAS code for how to do so, step-by-step. I […]

Read more »


Subscribe

Email:

  Subscribe