Use PROC DECIDE to assign a treatment to each patient.
The cost associated with each treatment is: NOTHING = 0 cost, ANTIBIOT
= 5 for possible bad side effects, and SURGERY = 20 for possible severe side
effects.
proc decide data=outdis out=outdec outstat=sumdec;
target dx;
posteriors benign infectio cancer;
decision decdata=rx
oldpriorvar=eqprior priorvar=prior
decvars=nothing antibiot surgery
cost= 0 5 20;
run;
title2 'Treatment: Cost of surgery=20';
proc print data=sumdec label; run;
proc plot data=outdec; plot y*x=d_rx; run;
The DECIDE Procedure
References
Berger, J. O. (1980), Statistical Decision Theory and Bayesian Analysis, Second Edition, New
York: Springer-Verlag.
Clemen, R. T. (1991), Making Hard Decisions: An Introduction to Decision Analysis, Boston:
PWS-Kent.
DeGroot, M. H. (1970), Optimal Statistical Decisions, New York: McGraw-Hill.
Robert, C. P. (1994), The Bayesian Choice, a Decision Theoretic Motivation, New York:
Springer-Verlag.
Savage, L. J. (1972), The Foundations of Statistics, Second Revised Edition, New York: Dover.
Copyright 2000 by SAS Institute Inc., Cary, NC, USA. All rights reserved.
The DMDB Procedure
The DMDB Procedure
Overview
Procedure Syntax
PROC DMDB Statement
CLASS Statement
FREQ Statement
ID Statement
TARGET Statement
VARIABLE Statement
WEIGHT Statement
Details
Examples
Example 1: Getting Started with the DMDB Procedure
Example 2: Specifying a FREQ Variable
Copyright 2000 by SAS Institute Inc., Cary, NC, USA. All rights reserved.
The DMDB Procedure
Overview
SAS/Enterprise Miner architecture is based on the creation of a data mining database (DMDB) that is a
snapshot of the original data. PROC DMDB creates this DMDB from the input data source. It also
compiles and computes metadata information about the input data based on variable roles and stores it in
a metadata catalog. The DMDB and the associated metadata catalog facilitate subsequent data mining
activities. They are both designed for processing and storage efficiencies.
Note: The DMDBCAT= argument is required for the following procedures: ASSOC, DMDB, DMINE,
DMSPLIT, SPLIT, and SEQ. It is optional in the NEURAL and DMREG procedures. It is not a valid
argument in the RULEGEN and STDIZE procedures.
Copyright 2000 by SAS Institute Inc., Cary, NC, USA. All rights reserved.
The DMDB Procedure
Procedure Syntax
PROC DMDB < option(s)>;
CLASS variable(s) < ORDER=order-option(s)>;
ID variable(s);
FREQ variable;
TARGET variable(s);
VARIABLE variable(s) WEIGHT= weight-variable>;
WEIGHT variable;
Copyright 2000 by SAS Institute Inc., Cary, NC, USA. All rights reserved.
The DMDB Procedure
PROC DMDB Statement
Invokes the DMDB procedure.
PROC DMDB < option(s)>;
Required Arguments
DATA= SAS-data-set
Names the SAS data set containing the information that you want added to the data mining
database.
DMDBCAT=SAS-catalog
Names the metadata catalog that is created or updated by PROC DMDB.
Refer to
Details
for more information.
Options
BATCH | NOMETAIN
Specifies the creation of a new metadata catalog as specified in the DMDBCAT= option, instead
of updating an existing metadata catalog. Any existing catalog with this name will be overridden
and replaced by system-generated information.
MAXLEVEL=integer
Specifies the maximum number of class levels to be processed.
Default:
MACINT. (If an integer greater than MACINT is specified, the integer
specified for MAXLEVEL is ignored and MACINT is used.)
Range:
integer 3
OUT= SAS-data-set
Names the data mining database (DMDB) that you want created. The new DMDB contains each
of the ID, VAR, and FREQ variables - copied 'as is' from the DATA= data set. The DMDB also
contains each of the CLASS variables written out as their corresponding integer class level value
in 5-bytes (sizeof (float)+1).
UPDATE= SAS-data-set
Names the previously created data mining database that you want updated with the observations
given in the DATA= data set. At the same time, these observations update the information
maintained in the DMDBCAT= option, reflecting the revised statistics from the additional input
records.
VARDEF=divisor
Specifies the divisor to use in the calculation of the variance and standard deviation. The
following table shows the possible values for VARDEF:
Values for VARDEF=
Value
Divisor
Formula
DF
degrees of
freedom
n- 1
N
number of
observations
n
WDF
sum of
weights
minus one
(
w
i
) -
1
WEIGHT|WGT
sum of
weights
w
i
Default:
DF (degrees of freedom)
Tip:
When you use the WEIGHT statement, you can specify VARDEF=WDF to
get an estimate of the variance of an observation using the average
observation weight.
CAUTION:
Using a Divisor with the WEIGHT statement. If you use a WEIGHT statement and you
calculate the variance or standard deviation, you may want to specify VARDEF=WEIGHT.
Use WEIGHT as the divisor to compute an approximate estimate of the variance of an
observation using the average observation weight. Use VARDEF=DF to compute the
standard error of the weighted mean.
Copyright 2000 by SAS Institute Inc., Cary, NC, USA. All rights reserved.
Dostları ilə paylaş: |