Showing posts with label SAS Enterprise Miner. Show all posts
Showing posts with label SAS Enterprise Miner. Show all posts

Sunday, August 7, 2016

Estimating the Causal Effect of Advising Contacts on Fall to Spring Retention Using Propensity Score Matching and Inverse Probability of Treatment Weighted Regression

Matt Bogard, Western Kentucky University

Abstract

In the fall of 2011 academic advising and residence life staff working for a southeastern university utilized a newly implemented advising software system to identify students based on attrition risk. Advising contacts, appointments, and support services were prioritized based on this new system and information regarding the characteristics of these interactions was captured in an automated format. It was the goal of this study to investigate the impact of this advising initiative on fall to spring retention rates. It is a challenge on college campuses to evaluate interventions that are often independent and decentralized across many university offices and organizations. In this study propensity score methods were utilized to address issues related to selection bias. The findings indicate that advising contacts associated with the utilization of the new software had statistically significant impacts on fall to spring retention for first year students on the order of a 3.26 point improvement over comparable students that were not contacted.

Suggested Citation

Matt Bogard. 2013. "Estimating the Causal Effect of Advising Contacts on Fall to Spring Retention Using Propensity Score Matching and Inverse Probability of Treatment Weighted Regression" The SelectedWorks of Matt Bogard
Available at: http://works.bepress.com/matt_bogard/25

Wednesday, November 6, 2013

Kentucky Association of Institutional Research (KAIR) Presentations

I'll be giving the following two talks at KAIR this year.
  
A Guide to Quasi-Experimental Designs

Quasi-experimental designs including propensity score methods, instrumental variables, regression discontinuity, and difference-in-difference estimators offer an inferentially rigorous alternative for program evaluation. In this guide, I begin with an introduction to the potential outcomes framework for rigorously characterizing selection bias and follow with discussions of quasi-experimental methods that may be useful to practitioners involved in program evaluation.

Paper: http://works.bepress.com/matt_bogard/24/
Slides: http://works.bepress.com/matt_bogard/27/

A Data Driven Analytic Strategy for Increasing Yield and Retention

As many Universities face the constraints of declining enrollment demographics, pressure from state governments for increased student success, as well as declining revenues, the costs of utilizing anecdotal evidence and intuition based on ‘gut’ feelings to make time and resource allocation decisions become significant. This presentation describes several data mining algorithms that could be used to develop a model to score university students based on their probability of enrollment and retention early in the enrollment funnel so that staff and administrators can work to recruit students that not only have an average or better chance of enrolling but also succeeding once they enroll. The use of SAS® Enterprise Miner and SAS® EBI server are discussed as an example of a business intelligence platform that can be used for implementing the models and delivering flexible web based reports to end users.

Paper: http://works.bepress.com/matt_bogard/26/
Slides:http://works.bepress.com/matt_bogard/28/




Wednesday, April 10, 2013

SAS Global Forum Paper 089-2013 (CART)

This was a nice paper illustrating and explaining CART (classification and regression trees).

089-2013  Using Classification and Regression Trees (CART) in SAS® Enterprise Miner™ for Applications in Public Health


"They (CARTs) are typically model free in their implementation. Howbeit, a model based statistic is sometimes used for a splitting criterion. The main idea of a classification tree is a statistician’s version of the popular twenty questions game. Several questions are asked with the aim of answering a particular research question at hand. However, they are advantageous because of their non -parametric and non- linear nature. They do not make any distribution assumptions and treat the data generation process as unknown and do not require a functional form for the predictors. They also do not assume additivity of the predictors which allows them to identify complex interactions. Tree methods are probably one of the most easily interpreted  statistical techniques. They can be followed with little or no understanding of Statistics and to a certain extent follow the decision process that humans use to make decisions. In this regard, they are conceptually simple yet present a powerful analysis (Hastie et al 2009)."

Monday, April 8, 2013

Using Advanced Analytics to Recruit Students for Improved Retention & Graduation



Forthcoming:SAS Global Forum (April 28-May 1 2013) 

Paper 044-2013
A Data Driven Analytic Strategy for Increasing Yield and Retention at Western Kentucky University Using SAS Enterprise BI and SAS Enterprise Miner
Matt Bogard, Western Kentucky University, Bowling Green, KY

ABSTRACT

As many universities face the constraints of declining enrollment demographics, pressure from state governments for increased student success, as well as declining revenues, the costs of utilizing anecdotal  evidence and intuition based on ‘gut’ feelings to make time and resource allocation decisions become significant. This paper describes how we are using SAS® Enterprise Miner to develop a model to score university students based on their probability of enrollment and retention early in the enrollment funnel so that staff and administrators can work to recruit students that not only have an average or better chance of enrolling but also succeeding once they enroll. Incorporating these results into SAS® EBI will allow us to deliver easy-to-understand results to university personnel.


PDF TEXT available at Proceedings of the SAS® Global Forum 2013 Conference

Conference: http://support.sas.com/events/sasglobalforum/2013/index.html  
 


The correct bibliographic citation for this publication is as follows:
SAS Institute Inc. 2013.Proceedings of the SAS® Global Forum 2013 Conference. Cary, NC:

Tuesday, April 2, 2013

Is the ROC curve a good metric for model calibration?

I previously discussed the use of the ROC curve as a tool for model assessment, particularly as a metric for discrimination. I stated that this metric (particularly the area under the ROC curve or c-statistic) is used increasingly in the machine learning community and is preferred over other measures of fit like precision or the F1-Score because it evaluates model performance across all considered cutoff values vs. an arbitrarily chosen cutoff (Bradley, 1997). I still prefer this metric over a metric based on an arbitrary cutoff (like percentage of correct predictions, precision, recall or the F-1 score). However, if the goal is to use your predictive model to stratify your score data into groups (like in a market segmentation application or this example) then the ROC curve may not be the absolute best metric. The metric we are actually after is one that assesses model calibration (as discussed here).  In the article 'Use and Misuse of the Receiver Operating Characteristic Curve in Risk Prediction' we get several criticisms of using the ROC curve in this context:

'The c statistic also describes how well models can rank order cases and noncases, but is not a function of the actual predicted probabilities. For example, a model that assigns all cases a value of 0.52 and all noncases a value of 0.51 would have perfect discrimination, although the probabilities it assigns may not be helpful.'

'When the goal of a predictive model is to categorize individuals into risk strata, the assessment of such models should be based on how well they achieve this aim...The use of a single, somewhat insensitive, measure of model fit such as the c statistic can erroneously eliminate important clinical risk predictors for consideration in scoring algorithms'


The paper goes on to demonstrate that there is in fact a tradeoff between model discrimination ( as measured by the ROC curve) and calibration.

In this context, we may prefer a metric that is based on calibration, like the Hosmer-Lemeshaw test, but it is often criticized for sensitivity to group/category compositions, has low power in small sample sizes, and is hypersensitive and misleading in large sample sizes. 

Here is one proposed solution (discussed previously):

From: NATIONAL QUALITY FORUM National Voluntary Consensus Standards for Patient Outcomes Measure Summary. (link)

“Because of the very large sample sizes studied here, a statistically significant
Hosmer-Lemeshow statistic is not considered informative with respect to calibration.”
Although the HL statistic is uninformative, model calibration could still be assessed graphically. This
could be done by comparing observed vs. predicted event rates within deciles of predicted risk."


The Assessment Score Rankings and Assessment Score Distribution tables from SAS Enterprise Miner are helpful in this regard.

Additional References:
Nancy R. Cook, Use and Misuse of the Receiver Operating Characteristic Curve in Risk Prediction. Circulation. 2007; 115: 928-935
 


Monday, April 1, 2013

SAS Global Forum Papers

Using SAS® Enterprise BI and SAS® Enterprise MinerTM to Reduce Student Attrition

Matt Bogard, Western Kentucky University
Chris James
Tuesdi Helbig
Gina Huff

Abstract

The true supremacy of the SAS® Enterprise Business Intelligence Server is the ability to utilize the power of SAS® Analytics to deliver real-time information to end users, who usually do not understand statistics, but have the ability to make a difference if they have easy access to the analyzed data. This paper describes the process of using SAS® Enterprise Miner to develop a model to score university students based on their risk of attrition and deliver easy-to-understand results to university personnel using SAS® EBI.

Suggested Citation

Matt Bogard, Chris James, Tuesdi Helbig, and Gina Huff. "Using SAS® Enterprise BI and SAS® Enterprise MinerTM to Reduce Student Attrition" SAS Global Forum 2012 Proceedings.031-2012 (2012).

http://support.sas.com/resources/papers/proceedings12/031-2012.pdf 

A Data Driven Analytic Strategy for Increasing Yield and Retention at Western Kentucky University Using SAS Enterprise BI and SAS Enterprise Miner

Matt Bogard, Western Kentucky University

Article comments

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product names are trademarks of their respective companies.

Abstract

As many Universities face the constraints of declining enrollment demographics, pressure from state governments for increased student success, as well as declining revenues, the costs of utilizing anecdotal evidence and intuition based on ‘gut’ feelings to make time and resource allocation decisions become significant. However, grasping advanced statistical methods and analytics for data driven decision making can be overwhelming to some staff making buy in difficult. This paper describes how we are using SAS® Enterprise Miner to develop a model to score university students based on their probability of enrollment and retention early in the enrollment funnel so that staff and administrators can work to recruit students that not only have an average or better chance of enrolling but also succeeding once they enroll. Incorporating these results into SAS® EBI will allow us to deliver easy-to-understand results to university personnel.

 http://support.sas.com/resources/papers/proceedings13/044-2013.pdf

Wednesday, September 5, 2012

SAS Enterprise Miner Demo

Not a bad demo for SAS EM. Some people would offer up the criticism that you can't just point and click your way through statistics or a model building process without a rigorous understanding of what is going on. I would agree. A good background in statistics, machine learning and research methodology is essential. I personally view statistics and machine learning as a language best communicated via code not pictures and icons. Base SAS, SAS IML, and R will let you get your hands dirty if you really want to figure out what is going on. To me, the point of SAS EM isn't that SAS makes it possible to point and click your way through a problem without really understanding what's going on, but that given the appropriate background knowledge, you can expedite what can be a very tedious process. SAS also offers a very good training and a predictive modeling certification program to go along with the software that I highly recommend.

Saturday, May 5, 2012

An Intuitive Approach to Text Mining with SAS IML

Text Mining- in Plain English: Turning Text into Numbers

With Twitter, Facebook, email, online forums, open response surveys, customer and reader comments on web pages and news articles etc. there is a lot of information available to companies and organizations in the form of text. Without hiring experts to read through all of the thousands of pages worth of text available and making subjective claims about its meaning, text mining allows us to take otherwise unusable 'qualitative' data and convert it into quantitative measures that we can use for various types of reporting and modeling. In the example below I demonstrate how the mathematical technique of singular value decomposition  (SVD) can be used to do this.

Sometimes to assess statistical techniques, or to even understand them at a basic level, you need data with properties you understand. With numerical data, that typically might call for simulation. But since we are dealing with text, I just made some up that will work to clearly demonstrate the effectiveness of SVD.

Below you will see 10 hypothetical comments to the question- 'What is your take on pink slime?' Each person's response is considered a document, and I have classified each document as type 'H' or 'S' as explained below.  The goal will be to see if we can use a basic application of SVD to convert these comments into numbers and use them to predict what type of person  made which type of comments (i.e. does a comment belong in category H or S) based on clustering or some type of predictive model. This gets way beyond simply classifying comments by doing a key word search. SVD allows us to not only classify documents by the specific words they contain, but also by how similar they are.

 The purpose of this exercise is to provide intuition for text mining and the application of singular value decomposition. The text above is made up, and specifically designed to produce the results I'm after. I'm not making any claims one way or the other about how realistic this is. But suppose these are potential customers and we want to be able to distinguish between the hippies, who favor a more local nostalgic food supply from centuries past  (designated as class or type 'H') and the animal scientists, designated as type 'S.' Obviously comments of class H are critical of modern agriculture and technology.  We might want to make these distinctions for PR, marketing, lobbying,or educational outreach purposes.  

After cleaning up the text (which many software programs like SAS Enterprise Miner provide excellent tools for doing so)by eliminating parts of speech, articles, etc. we can form a term-document frequency matrix as follows:




Singular Value Decomposition

Singular Value Decomposition (SVD) is a concept from linear algebra based on the following matrix equation:

A = USV which states that a rectangular matrix A can be decomposed into 3 other matrix components:

U  consists of the orthonormal eigenvectors of AA’,  where U’U =  I (recall from linear algebra, orthogonal vectors of unit length are ‘orthonormal’)
V consists of the orthonormal eigenvectors of A’A
S  is a diagonal matrix consisting of the square root of the eigenvalues of U or V (which are equal). The values in S depict the variance of linearly independent components along each dimension similarly to the way eigenvalues depict variance explained by ‘factors’ or components in principle components analysis (PCA).

SVD provides the mathematical foundation for text mining.

A  term document matrix A can be decomposed as in:
A = USV’

If the term document matrix A were a collection of individuals’ textual responses or comments to a survey question (or Facebook post etc. ) then each individual’s response would be considered a ‘document’. The individual words they used in their response are the ‘terms.’ The term document frequency matrix consists of rows that represent each term and columns that represent each ‘document’ or individual. 

The  vectors in U can be used to score documents in the term-document matrix, as in U’A.  (this may be analogous to the way values of x are scored by eigenvectors in PCA)  As a result, a single numerical value or ‘score’ can be assigned to each person’s textual response (i.e. each document) for each SVD dimension (i.e. each kept independent vector in U). Thus the text is converted into numerical scores (via the transformation U’A) that can then be used in predictive modeling (as predictor variables) or  clustering can be utilized to cluster the individual textual responses (or ‘documents’).  So ultimately SVD converts  otherwise unuseful  text into numeric SVD scores or more interpretable clusters.  Likewise, using  the weights from the eigenvectors that comprise  V to score the terms in the term document matrix A, as in AV’ we can score  cluster like terms as ‘topics’. 

Thus SVD of A gives allows us to derive the following scores:

U’A = SVD document vectors 
AV’ = SVD term vectors

 This can be loosely demonstrated in using PROC IML in SAS. Specifying the term document frequency matrix in PROC IML and implementing SVD produces:









 
The document vectors U’A can be depicted as follows:


 
Here is the original text document with customer types/classes and the appended SVD scores. 

 As depicted above, SVD has allowed us to replace all of the text with the quantitative values for the associated SVD scores (derived from U'A). In this case, I'm representing all of the text with just two SVD dimensions. These values can then be used for clustering or entered into a predictive model.


 
It is easy to see that the different documents types (response types H vs S) cluster very well on the dimensions SVD1 and SVD2. In fact, all responses of type S have a value of SVD2 < .5.
The SVD values can also be entered into a regression or other type of predictive model.

 
Consistent with the observed relationship between SVD2 and class ‘S’ and ‘H’ clusters, we see that SVD2 is significant in the regression. In addition, it shows that higher values of SVD2 decrease the probability of being classified as document or response type ‘S’. Yes, this is OLS on a binary dependent variable, but again the purpose is to provide intuition and motivation for using text analytics for predictive modeling. 

This seemed to work ok on a small collection of documents carefully constructed to illustrate the concepts above, but tools like SAS Text Miner in conjunction with SAS Enterprise Miner are designed specifically to do this type of analysis on a much larger scale. I have used both of these tools on much larger document collections and obtained promising results using text topics from SVD in predictive modeling applications.

SAS CODE


proc iml;
       A = {0 0      0      1      0      0      0      0      0      0,
1      1      0      0      0      1      0      0      0      0,
0      0      0      0      0      1      1      1      0      2,
0      0      0      0      0      1      0      0      0      0,
0      1      1      0      0      0      0      0      0      0,
1      0      0      0      0      0      0      0      0      0,
0      0      1      0      1      0      0      0      0      0,
0      0      0      0      1      0      0      0      0      0,
0      0      0      0      1      0      0      0      0      0,
0      0      1      0      0      0      0      0      0      0,
0      0      0      0      0      1      0      1      0      1,
0      0      1      0      0      0      0      0      0      0,
0      1      1      1      0      0      0      0      0      0,
0      0      0      1      0      0      0      0      0      0,
0      0      0      0      0      0      1      1      0      0,
1      0      1      0      0      0      0      0      0      0,
0      0      0      0      0      0      1      0      0      0,
0      0      0      0      0      0      0      0      0      1,
0      0      0      0      0      1      0      0      0      0,
0      0      1      0      0      0      0      0      0      0,
1      0      0      0      1      0      0      0      0      0,
0      1      0      1      0      0      0      0      0      0,
0      1      0      0      0      1      0      0      0      0,
0      0      0      0      0      0      0      1      0      0,
0      0      0      0      0      0      0      0      0      1,
0      0      0      0      0      0      0      0      1      1,
0      0      0      0      0      0      0      0      0      1,
1      0      0      0      1      0      0      0      0      0,
0      0      0      0      0      0      1      1      1      0,
0      0      1      0      0      0      0      0      0      0,
0      0      0      0      0      0      0      0      1      0,
0      0      0      0      0      0      0      0      0      1,
0      0      0      0      0      1      0      1      0      0,
0      0      0      0      0      0      0      0      1      0
};
       print(A); /* print matrix A*/
       n = nrow(A); /* how many rows */
       p = ncol(A); /* how many columns */
       print(n);   
       print(p);
       call svd(u,s,v,A); /* sigular value decomposition of A = usv'*/
       print(u); /* independent eigenvectors of AA' */
       print(s); /*  independent eigenvectors of A'A */
       print(v); /*singular values (sqrt(eigenvalues)) of AA' or A'A */
       uTa = T(u)*A; /* document vectors*/
       avT = A*T(v); /* term vectors */
       print(uTa);
       print(avT);
    /* scoring a data set */
       ID = {1, 2, 3, 4, 5, 6, 7, 8, 9,10}; /* create a document id matrix */
       print(ID);
       docscores =ID||T(uTa); /* combine with svd results */
       print(docscores);
       /* export as a SAS data set */
       varnames = 'svd1':'svd10';
       create svd_scores from docscores[colname = varnames];
       append from docscores;
       close svd_scores;

quit;
run;

 *-------------------------------------------------------------------------------------*
 |  SCORING, CLUSTERING AND PREDICTIVE MODELING
 *-------------------------------------------------------------------------------------*;

* CREATE CLIENT DATA SET;

DATA CLIENTS;
       INPUT ID CLASS $ ;
       CARDS;
1      H
2      H
3      H
4      H
5      H
6      S
7      S
8      S
9      S
10  S
;
RUN;

* MERGE WITH SVD SCORES;

PROC SQL;
       CREATE TABLE CLIENTS_SCORED AS
       SELECT A.ID, A.CLASS, B.SVD2 AS SVD1, B.SVD3 AS SVD2
       FROM CLIENTS A LEFT JOIN SVD_SCORES B
       ON A.ID = B.SVD1;
QUIT;

PROC PRINT DATA = CLIENTS_SCORED;
RUN;


* CLUSTER/ VISUALIZE  CLIENTS BASED ON SVD SCORES;
PROC GPLOT DATA = CLIENTS_SCORED;
       PLOT SVD1*SVD2 = ID;
RUN;
QUIT;


* RECODE FOR NUMERIC DEPENDENT VAR;

DATA CLIENTS_SCORED2;
       SET CLIENTS_SCORED;
       IF CLASS = 'H' THEN Y = 0;
       ELSE Y = 1;
RUN;

* BASIC REGRESSION MODEL;

PROC REG DATA = CLIENTS_SCORED2;
       MODEL Y = SVD1 SVD2;
RUN;
QUIT;