Automatic building of logistic model.

by Irina 21. April 2007 09:19

Description: The data is a collection of information on colleges and universities ( only for example and not pretend to be real). The primary interest is in predicting of graduation . Potential predictor variables are tuition, income, wealth and grades on different subjectes-  200 rows .

The process:

1.

The first section of code splits the file into modeling and validation data sets. Validation sets constructed from the 50/50 stratified sample should be adequate for the purposes of this exercise. I took 95/5 only for example and because of very small data

				
						
DATA model_college;   
                                          
 SCAN: SET  college  end=eof; 
        N+1; 
        IF NOT eof THEN GOTO SCAN; 
        K=0.95*N;       * K IS THE NUMBER TO RANDOMLY SELECT  
                               IT MAY BE A FUNCTION OF N, 
                               E.G.: K=.05*N FOR A 5 PERCENT SAMPLE; 
 LOOP: SET  college ; 
       PROB=K/N;        * PROB IS THE CURRENT SELECT PROBABILITY;
IF RANUNI(123467)>PROB THEN GOTO NEXT; OUTPUT; K=K-1; * THE OBSERVATION IS SELECTED; NEXT: N=N-1; IF N>0 THEN GOTO LOOP; RUN;
For the next steps go to: Automatic building of logistic model

Data for model:   college.txt (10.17 kb)

Tags: logistic

SAS | macro

Related posts

Comments

7/29/2009 8:14:24 AM

wonderful ... i just want to subscribs in your website what i have to do ???

chiranjit

Add comment


(will show your Gravatar icon)  





Live preview

7/30/2010 8:20:11 AM

 

About the author

Irina Spivak Irina Spivak
Team Leader at G-Stat. More...


Send mail Email

Authors

Blogroll

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2010

    Sign in

    eXTReMe Tracker