_VSUMW_
Valid: Sum of
Case Weights
Times
Frequency
_VMISC_
Valid:
Misclassification
Rate
Chapter Contents
Previous
Next
Top of Page
Copyright 2000 by SAS Institute Inc., Cary, NC, USA. All rights reserved.
The DMREG Procedure
Examples
The following examples were executed using the HP-UX version 10.20 operating system and the SAS
software release 6.12TS045.
Example 1: Linear and Quadratic Logistic Regression with an Ordinal Target (Rings
Data)
Example 2: Performing a Stepwise OLS Regression (DMREG Baseball Data)
Example 3: Comparison of the DMREG and LOGISTIC Procedures when Using a
Categorical Input Variable
Copyright 2000 by SAS Institute Inc., Cary, NC, USA. All rights reserved.
The DMREG Procedure
Example 1: Linear and Quadratic Logistic Regression with an Ordinal
Target (Rings Data)
Features
Scoring a Test Data Set
q
Outputting Fit Statistics
q
Creating a Classification Table
q
Plotting the Posterior Probabilities
q
This example demonstrates how to perform both a linear and a quadratic logistic regression with an ordinal target. The example DMDB
training data set SAMPSIO.DMDRING contains an ordinal target with 3 levels (C= 0, 1, or 2) and two continuous inputs (X and Y). There
are 180 observations in the data set. The SAMPSIO.DMSRING data set is scored using the scoring formula from the trained models. Both
data sets are stored in the sample library.
Linear-Logistic Program
proc gplot data=sampsio.dmdring;
plot y*x=c /haxis=axis1 vaxis=axis2;
symbol c=black i=none v=dot;
symbol2 c=red i=none v=square;
symbol3 c=green i=none v=triangle;
axis1 c=black width=2.5 order=(0 to 30 by 5);
axis2 c=black width=2.5 minor=none order=(0 to 20 by 2);
title 'Plot of the Rings Training Data';
run;
proc dmreg data=sampsio.dmdring dmdbcat=sampsio.dmdring;
class c;
model c = x y;
score out=out outfit=fit;
score data=sampsio.dmsring nodmdb out=gridout;
title 'Linear-Logistic Regression with Ordinal Target';
run;
proc print data=fit noobs label;
var _aic_ _max_ _rfpe_ _misc_ ;
title2 'Fit Statistics for the Training Data Set';
run;
proc freq data=out;
tables f_c*i_c;
title2 'Misclassification Table: Training Data';
run;
proc gplot data=out;
plot y*x=i_c / haxis=axis1 vaxis=axis2;
symbol c=black i=none v=dot;
symbol2 c=red i=none v=square;
symbol3 c=green i=none v=triangle;
axis1 c=black width=2.5 order=(0 to 30 by 5);
axis2 c=black width=2.5 minor=none order=(0 to 20 by 2);
title2 'Classification Results';
run;
proc gcontour data=gridout;
plot y*x=p_c1 / pattern ctext=black coutline=gray;
plot y*x=p_c2 / pattern ctext=black coutline=gray;
plot y*x=p_c3 / pattern ctext=black coutline=gray;
title2 'Posterior Probabilities';
pattern v=msolid;
legend frame;
run;
Linear-Logistic Output
PROC GPLOT Plot of the Rings Training Data
DMREG Summary Profile Information
PROC DMREG first lists background information about the fitting of the linear-logistic model. Included are the name of the input data set,
the response variable, the number of response levels, the number of observations used, the error distribution, and the link function.