new in sas 9.2
TRANSCRIPT
-
7/29/2019 New in SAS 9.2
1/33
NEW IN SAS 9.2
STATISTICAL PROCEDURES
SUN LI
SENIOR STATISTICIANCENTRE FOR ACADEMIC COMPUTING
mailto:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected] -
7/29/2019 New in SAS 9.2
2/33
OUTLINE
Useful links
Base SAS
SAS/ACCESS
SAS/STAT
SAS Stat Studio software
SAS Power and Sample Size (PSS application)
PROC GENMOD Bayesian capability
PROC GLIMMIX Generalized linear mixed model
SAS/ETS : PROC COUNTREG - ZINB model
SAS/OR: SAS Simulation Studio2
-
7/29/2019 New in SAS 9.2
3/33
USEFUL LINKS
SAS 9.2 Documentation:
Whats new in SAS 9.2?
http://support.sas.com/documentation/cdl/en/whatsnew/61982/HTML/default/acpcrefwhatsnew902.htm
http://support.sas.com/documentation/cdl/en/whatsnew/62435/PDF/default/whatsnew.pdf
Training notes & example data sets:http://research2.smu.edu.sg/CAC/StatisticalComputing/Wiki/SAS-Training%20Slides%20and%20Syntax.aspx
3
http://support.sas.com/documentation/cdl/en/whatsnew/61982/HTML/default/acpcrefwhatsnew902.htmhttp://support.sas.com/documentation/cdl/en/whatsnew/61982/HTML/default/acpcrefwhatsnew902.htmhttp://support.sas.com/documentation/cdl/en/whatsnew/62435/PDF/default/whatsnew.pdfhttp://support.sas.com/documentation/cdl/en/whatsnew/62435/PDF/default/whatsnew.pdfhttp://research2.smu.edu.sg/CAC/StatisticalComputing/Wiki/SAS-Training%20Slides%20and%20Syntax.aspxhttp://research2.smu.edu.sg/CAC/StatisticalComputing/Wiki/SAS-Training%20Slides%20and%20Syntax.aspxhttp://research2.smu.edu.sg/CAC/StatisticalComputing/Wiki/SAS-Training%20Slides%20and%20Syntax.aspxhttp://research2.smu.edu.sg/CAC/StatisticalComputing/Wiki/SAS-Training%20Slides%20and%20Syntax.aspxhttp://research2.smu.edu.sg/CAC/StatisticalComputing/Wiki/SAS-Training%20Slides%20and%20Syntax.aspxhttp://research2.smu.edu.sg/CAC/StatisticalComputing/Wiki/SAS-Training%20Slides%20and%20Syntax.aspxhttp://support.sas.com/documentation/cdl/en/whatsnew/62435/PDF/default/whatsnew.pdfhttp://support.sas.com/documentation/cdl/en/whatsnew/62435/PDF/default/whatsnew.pdfhttp://support.sas.com/documentation/cdl/en/whatsnew/61982/HTML/default/acpcrefwhatsnew902.htmhttp://support.sas.com/documentation/cdl/en/whatsnew/61982/HTML/default/acpcrefwhatsnew902.htm -
7/29/2019 New in SAS 9.2
4/33
Enhanced procedures to discuss:
PROC MEANS
PROC UNIVARIATE
PROC FREQ
4
-
7/29/2019 New in SAS 9.2
5/33
BASE SAS
1. PROC MEANS
The PRT statistic is now an alias for the PROBT statistic
The MODE statistic can now be used with PROC MEANS.
5
-
7/29/2019 New in SAS 9.2
6/33
BASE SAS
2. PROC UNIVARIATE
CDFPLOT: plots the observed cdf of a variable and enables you tosuperimpose a fitted theoretical distribution on the graph.
PPPLOT: creates a P-P plot which compares the ecdf of a variable
with a specified theoretical cumulative distribution function.
6
-
7/29/2019 New in SAS 9.2
7/33
BASE SAS
3. PROC FREQ
Testing for specified proportions
Distribution plot and other plots
Binomial proportion tests and confidence intervals
7
-
7/29/2019 New in SAS 9.2
8/33
Support new file formats:
dBase with memos (DBFMEMO), JMP, Paradox DB, SPSS
SAV, Stata DTA
Date/Time Value:
USEDATE=YES /NO option in PROC IMPORT
8
-
7/29/2019 New in SAS 9.2
9/33
New related software:
SAS Stat Studio software
SAS Power and Sample Size (PSS application)
New procedures:
Bayesian capabilities are introduced under procedures:GENMOD, LIFEREG, and PHREG
GLIMMIX, GLMSELECT, and QUANTREG
Experimental procedures: HPMIXED, MCMC, SEQDESIGN, SEQTEST ,TCALIS
9
-
7/29/2019 New in SAS 9.2
10/33
SAS/STAT
1. SAS Stat Studio 3.1
New software for data exploration and analysis
Start > All Programs > Stat Studio 3.1
Demo basic steps with hands-on: Graph & Polynomial regression with data set:
hurricanes.sas7bdat
Transform data & Model fitting with data setbaseball.sas7bdat
SAS help and documentation:
SAS products -> SAS Stat Studio 3.1 -> SAS Stat Studio 3.1Users Guide
10
-
7/29/2019 New in SAS 9.2
11/33
11
-
7/29/2019 New in SAS 9.2
12/33
SAS/STAT
2. SAS Power and Sample Size 3.1
PSS application
Start > All Programs > SAS > SAS Power and Sample Size> SAS Power and Sample Size 3.1
Demo basic steps with hands-on:
Power analysis for One Sample T Test
SAS help and documentation:
SAS products -> SAS/STAT -> SAS/STAT Users Guide ->The Power and Sample Size Application
12
-
7/29/2019 New in SAS 9.2
13/33
13
-
7/29/2019 New in SAS 9.2
14/33
SAS/STAT
3. PROC GENMOD Bayesian Analysis of a Linear Regression Model:
Here is a study of 54 patients undergoing a certain kind of liveroperation in a surgical unit. The data setSurg contains survival
time and certain covariates for each patient.
14
-
7/29/2019 New in SAS 9.2
15/33
SAS/STAT
15
-
7/29/2019 New in SAS 9.2
16/33
SAS/STAT
16
BAYES : produces Bayesian analysis via Gibbs sampling for most of thestatistical analyses.
SEED: specifies randomization seed. It is used to maintain reproducibility.
OUTPUT : saves the samples in the SAS data set PostSurg for furtherprocessing.
By default, a uniform prior distribution is assumed on the regressioncoefficients. A noninformative gamma prior is used for the scale parametersigma.
ODS Graphics is enabled as specified in the SAS statements to display thediagnostic plots.
-
7/29/2019 New in SAS 9.2
17/33
-
7/29/2019 New in SAS 9.2
18/33
18
SAS/STAT
There is a 1.00 probability of a positive
relationship between the logarithm of a
blood clotting score and survival time,adjusted for the other covariates.
-
7/29/2019 New in SAS 9.2
19/33
19
SAS/STAT
4. PROC GLIMMIX
Comparison btw GLIMMIX and other procedures
1) Response can have a nonnormal distribution (MIXED assumesnormally distributed response.)
2) Incorporates random effects in the model and so allows forconditional and marginal inference (GENMOD allows only formarginal inference.)
3) The class of generalized linear mixed models is a special case of the
nonlinear mixed models; hence some of the models you can fit withNLMIXED can also be fit with GLIMMIX.
(The details can be found in the SAS help documentation.)
-
7/29/2019 New in SAS 9.2
20/33
Logistic Regressions with Random Intercepts
Researchers investigated the performance of banks in a multicenterstudy. They randomly selected 15 centers. One of the study goals wasto compare the occurrence of loan defaults for the banks. In eachcenter two types of banks were selected and coded as A" and "B.Under each type, there are a few of banks selected for the study.
20
SAS/STAT
-
7/29/2019 New in SAS 9.2
21/33
To model the probability of defaults happened in the two types of banks:A andB, you need to account for the fixed group effect and the randomselection of centers. We assume a linear model that relates group andcenter effects to the logit of the probabilities:
A-B measures the difference in the logits.
0 is the overall intercept in the model. 21
SAS/STAT
-
7/29/2019 New in SAS 9.2
22/33
22
SAS/STAT
CLASS : specifies the classification variables.
MODEL : specifies response variable as a sample proportion by using theevents/n syntax.
SOLUTION : requests a list of solutions for fix-effects parameter estimates.Because the default/n syntax, the procedure gives binomial distribution withlogit link.
RANDOM : specifies that the linear predictor contains an intercept term that
randomly varies at the level ofcentereffect. In other words, a randomintercept is drawn separately and independently for each center in the study.
LSMEANS : requests the least squares means of the group effect on the logitscale.
ILINK: adds estimates, standard errors, and confidence limits on the mean(probability) scale .
-
7/29/2019 New in SAS 9.2
23/33
23
SAS/STAT
-
7/29/2019 New in SAS 9.2
24/33
24
SAS/STAT
The details can be found in the SAS help documentation in the
individual procedures.
-
7/29/2019 New in SAS 9.2
25/33
25
-
7/29/2019 New in SAS 9.2
26/33
-
7/29/2019 New in SAS 9.2
27/33
27
SAS/ETS
ZIP and ZINB Models for Data Exhibiting Extra Zeros
An often encountered characteristic of count data is that the number ofzeros in the sample exceeds the number of zeros predicted by either thePoisson or negative binomial model.
Zero-inflated Poisson (ZIP) and zero-inflated negative binomial (ZINB)models explicitly model the production of zero counts to account forexcess zeros.
-
7/29/2019 New in SAS 9.2
28/33
28
SAS/ETS
This study examines how factors such as gender (fem), marital status (mar),number of young children (kid5), prestige of the graduate program (phd),and number of articles published by a scientists mentor (ment), affect thenumber of articles (art) published by the scientist.
-
7/29/2019 New in SAS 9.2
29/33
29
SAS/ETS
-
7/29/2019 New in SAS 9.2
30/33
30
SAS/ETS
-
7/29/2019 New in SAS 9.2
31/33
31
SAS Simulation Studio
Other enhanced features, see theSAS/OR documentation.
-
7/29/2019 New in SAS 9.2
32/33
32
-
7/29/2019 New in SAS 9.2
33/33