SAS STAT News in SAS 9

SAS®STAT News in SAS 9 Focus on Cli F Clinical i l Statistics St ti ti and d SAS Biometric procedures a d Svolba S o ba Dr. Ge Gerhard Analytic Exper...
Author: Steven West
5 downloads 1 Views 1MB Size
SAS®STAT News in SAS 9 Focus on Cli F Clinical i l Statistics St ti ti and d SAS Biometric procedures

a d Svolba S o ba Dr. Ge Gerhard Analytic Expert Senior Solution Architect November 2008 - SAS-Austria Copyright © 2007, SAS Institute Inc. All rights reserved.

73 procedures in SAS®STAT 9.2 ACECLUS ANOVA BOXPLOT CALIS CANCORR CANDISC CATMOD CLUSTER CORRESP DISCRIM DISTANCE FACTOR FASTCLUS FREQ GAM GENMOD GLIMMIX GLM GLMMOD GLMSELECT HPMIXED INBREED KDE KRIGE2D LATTICE LIFEREG LIFETEST LOESS LOGISTIC MCMC MDS MI MIANALYZE MIXED MODECLUS MULTTEST NESTED NLIN NLMIXED NPAR1WAY ORTHOREG PHREG PLAN PLS POWER PRINCOMP PRINQUAL PROBIT PSS QUANTREG REG ROBUSTREG RSREG SCORE SEQDESIGN SEQTEST SIM2D SIMNORMAL STDIZE STEPDISC SURVEYFREQ SURVEYLOGISTIC SURVEYMEANS SURVEYREG SURVEYSELECT TCALIS TPSPLINE TRANSREG TREE TTEST VARCLUS VARCOMP VARIOGRAM Copyright © 2007, SAS Institute Inc. All rights reserved.

73 procedures in SAS®STAT 9.2 ACECLUS ANOVA BOXPLOT CALIS CANCORR CANDISC CATMOD CLUSTER CORRESP DISCRIM DISTANCE FACTOR FASTCLUS FREQ GAM GENMOD GLIMMIX GLM GLMMOD GLMSELECT HPMIXED INBREED KDE KRIGE2D LATTICE LIFEREG LIFETEST LOESS LOGISTIC MCMC MDS MI MIANALYZE MIXED MODECLUS MULTTEST NESTED NLIN NLMIXED NPAR1WAY ORTHOREG PHREG PLAN PLS POWER PRINCOMP PRINQUAL PROBIT PSS QUANTREG REG ROBUSTREG RSREG SCORE SEQDESIGN SEQTEST SIM2D SIMNORMAL STDIZE STEPDISC SURVEYFREQ SURVEYLOGISTIC SURVEYMEANS SURVEYREG SURVEYSELECT TCALIS TPSPLINE TRANSREG TREE TTEST VARCLUS VARCOMP VARIOGRAM Copyright © 2007, SAS Institute Inc. All rights reserved.

News in SAS®STAT ƒ New procedures ƒ Enhancements to existing procedures ƒ Multithreading g • GLM, LOESS, REG, and ROBUSTREG procedures have been multithreaded to exploit hardware with multiple CPUs • MEANS, SUMMARY, REPORT, SORT, SQL, TABULATE

ƒ ODS Graphics ƒ Power and Sample Size Application (Java Client)

Copyright © 2007, SAS Institute Inc. All rights reserved.

Agenda 1. Survival Analysis 2. Bayesian Analysis 3. Mixed Models 4. Regression Analysis 5 Power Analysis 5. 6. Sequential Design and Analysis

SAS 9.2 Live-Demo

Copyright © 2007, SAS Institute Inc. All rights reserved.

New options in the survival analysis procedures ƒ Proc LIFETEST • SURVIVAL statement enables the creation of confidence bands for the survivor function S(t) • Number of subjects at risk can be displayed for Kaplan Meier survival curves • Smoother hazard function using the kernel method can be specified

ƒ Proc PHREG • CLASS statement is available • HAZARDRATIO statement provides facitility to calculate hazard ratio in the presence of interactions • Firth Firth‘ss penalized likelihood method is provided

Copyright © 2007, SAS Institute Inc. All rights reserved.

SAS 9.2 Live-Demo

Bayesian analysis in SAS - Overview ƒ Bayesian analysis added to existing procedures • BAYES statement in Proc GENMOD, Proc LIFEREG, Proc PHREG • Gibbs sampling

ƒ Proc MCMC • Markov Chain Monte Carlo simulations • Flexible simulation-based procedure that is suitable for fitting a wide range of Bayesian models

Copyright © 2007, SAS Institute Inc. All rights reserved.

Bayesian analysis in SAS - Examples ƒ Proc PHREG SAS 9.2 Live-Demo

Bayesian Analysis of the Cox Model ƒ Proc MCMC

SAS 9 9.2 2 Live-Demo

g g Logistic Regression Model with a Prior

Copyright © 2007, SAS Institute Inc. All rights reserved.

New CALL routines (for simulations) ƒ CALL ALLPERM 2 SAS 9 9.2 Live-Demo

• generates all permutations of the values of several variables.

ƒ CALL LOGISTIC • returns the logistic value of each argument

ƒ CALL RANPERK • randomly permutes the values of the arguments and returns a p permutation of k out of n values.

ƒ CALL RANPERM • randomly permutes the values of the arguments

Copyright © 2007, SAS Institute Inc. All rights reserved.

Mixed Models ƒ Proc MIXED • Performs mixed model analysis and repeated measurement analysis • Likelihood or moment-based techniques

ƒ Proc GLIMMIX • Fits generalized linear mixed models by likelihood-based techniques

ƒ Proc NLMIXED • Fixed or random effects enter non-linearly • Conditional distribution of the data given the random effects must be specified normal, binomial binomial, − Either use available distributions like normal Poisson − or code your own distribution using SAS statements Copyright © 2007, SAS Institute Inc. All rights reserved.

High Performance Mixed Models ƒ Proc HPMIXED • Fits linear mixed models with simple covariance structures by sparse-matrix techniques • Large mixed model problems like 1000s of fixed and/or random effects • Only G-side random effects with variance component structure or unstructured covariance with Cholesky y parameterisation

Copyright © 2007, SAS Institute Inc. All rights reserved.

Generalized Linear Mixed Models – Proc GLIMMIX ƒ Conditional distribution of the data given the random effects is a member of the exponential family (binary, binomial, binomial Poisson, Poisson gamma gamma, beta, beta chi-square) ƒ Fixed-effects design matrix X is specified in the MODEL statement ƒ Random-effects design matrix Z is specified in the RANDOM statement ƒ Fits models based on likelihood based techniques ƒ Fits cumulative link models for ordinal data and generalized logit models for nominal data ƒ Empirical co-variance can be estimated through the EMPIRICAL= option ƒ Only GLM-type singular parameterization of CLASS variables is supported Copyright © 2007, SAS Institute Inc. All rights reserved.

SAS 9.2 Live-Demo

New Plots in Proc GLM for Diagnostic Diagnostic, Residual Residual, Interaction, …

Copyright © 2007, SAS Institute Inc. All rights reserved.

Changing between data structures in SAS

%MAKEWIDE

? %MAKELONG

Copyright © 2007, SAS Institute Inc. All rights reserved.

Transposing with macro %MAKELONG and %MAKEWIDE %MAKEWIDE(DATA=dogs_long, MAKEWIDE(DATA=dogs long OUT=dogs_wide_both2, ID=id, COPY=drug depleted, VAR=heamoglobin Histamine, TIME=Measurement);

Copyright © 2007, SAS Institute Inc. All rights reserved.

Proc LOGISTIC

ƒ Model can be output and input with the OUTMODEL and d INMODEL option ti ƒ SCORE statement allows to score new observations • ROC values are calculated for the new observations

ƒ Odds ratios in the presence of interactions are computed ƒ ROCCONTRAST compares different ROC models ƒ Performs Firth‘s penalized maximum likelihood

Copyright © 2007, SAS Institute Inc. All rights reserved.

SAS 9.2 Live-Demo

Quantile Regression with Proc QUANTREG ƒ Models the relationship between X and the conditional quantiles of Y given X=x ƒ Usefull where extrems are important and shall be modeled. ƒ More complete picture of the conditional distribution of Y given X=x, when lower and upper quantiles are of interest. E.g. study of body mass index

Copyright © 2007, SAS Institute Inc. All rights reserved.

SAS 9.2 Live-Demo

More regression procedures ƒ GLMSELECT

ƒ ROBUSTREG

• Model selection in the framework of general linear models

• Analyzing data that have outliers

• Selection methods in clude: LASSO, LAR

• Detect outliers

• Selection from 10.000s of effects; customization of stopping and selection criteria • Supports Suppo s a any y deg degree ee o of interactions e ac o s and nested effects • Data partition in training, validation and test data

Copyright © 2007, SAS Institute Inc. All rights reserved.

• Produce stable results in the presence of outliers • M, LTS, S and MM estimation

Power and Sample Size Analysis ƒ SAS tools • Proc POWER • Proc P GLMPOWER • Power and Sample Size Application

ƒ Available tests • t-tests, equivalence tests, and confidence intervals for means • tests, equivalence tests, and confidence intervals for binomial proportions ti • multiple regression • tests of correlation and p partial correlation • one-way analysis of variance • rank tests for comparing two survival curves • logistic l i ti regression i with ith binary bi response • Wilcoxon Mann-Whitney rank-sum test Copyright © 2007, SAS Institute Inc. All rights reserved.

SAS 9.2 Live-Demo

Sequential Design and Analysis Six steps of a group sequential design 1 Trial 1. T i l specification ifi i 2. Compute boundary values and sample size 3. Collect data according to trial to required sample size 4 Analyze data and compute 4. test statistic 5. Compare test statistic with b boundary d values l ((reject, j t accept, continue) 6. Compute parameter estimates, i confidence fid lilimits i for the parameter, and a pvalue for the hypothesis test Copyright © 2007, SAS Institute Inc. All rights reserved.

Sequential Design and Analysis ƒ

P Proc SEQDESIGN • Design interim analyses for clinical trials • Compute − Boundary values − Maximung and average sample size − Stopping probabilites − Numbers of events required at each stage (survival data)

ƒ

Proc SEQTEST • Perform interim analyses for clinical trials • Compare the test statistic with the corresponding boundary at each stage • Boundary adjustment for information levels p space p ordering g • Sample • Parameter estimate, p-value, confidence limits at the conclustion of a trial

Copyright © 2007, SAS Institute Inc. All rights reserved.

SAS 9.2 Live-Demo

Links and other ressources

(please copy and paste multiline links manually into the adress line) ƒ

What’s Wh t’ new iin SAS®STAT 9.2 92 http://support.sas.com/documentation/cdl/en/whatsnew/61 982/HTML/default/statugwhatsnew.htm

ƒ

A Comparison of the Mixed Procedure and the Glimmix Procedure http://www2.sas.com/proceedings/sugi31/189-31.pdf

ƒ

What’s new in SAS®STAT 9.0, 9.1 http://support.sas.com/documentation/whatsnew/91x/statu p pp gwhatsnew900.htm

ƒ

Introducing the GLIMMIX Procedure for Generalized Linear Mixed Models http://www2.sas.com/proceedings/sugi30/196-30.pdf

ƒ

An Introduction to Quantile Regression and the QUANTREG Procedure http://www2.sas.com/proceedings/sugi30/213-30.pdf

ƒ

ƒ

Introducing the GLMSELECT PROCEDURE for Model Selection http://www2.sas.com/proceedings/sugi31/207-31.pdf

Growing Up Fast: SAS 9.2 Enhancements to the GLIMMIX Procedure http://www2.sas.com/proceedings/forum2007/1772007 pdf 2007.pdf

ƒ

ƒ

Robust Regression and Outlier Detection with the ROBUSTREG Procedure http://www2.sas.com/proceedings/sugi27/p265-27.pdf

Old versus New: A Comparison of PROC LOGISTIC and PROC GLIMMIX http://www2.sas.com/proceedings/forum2008/2262008.pdf

ƒ

Advanced Statistical and Graphical features of SAS® PHREG http://www2.sas.com/proceedings/forum2008/3752008.pdf

ƒ

SAS Online Help for SAS®STAT, SAS®STAT Chapter 7: Introduction to Bayesian Analysis Procedures

ƒ

Data Preparation for Analytics http://www.sascommunity.org/wiki/Data_Preparation_for _Analytics

ƒ

Makewide and Makelong Macro http://www.sascommunity.org/wiki/Gerhard%27s_Sampl es

ƒ

An introduction to partial least squares regression http://support.sas.com/techsup/technote/ts509.pdf

ƒ

Sample-Size Sample Size Analysis in Study Planning: Concepts and Issues, with Examples Using PROC POWER and PROC GLMPOWER http://www2.sas.com/proceedings/sugi29/211-29.pdf

ƒ

Updates to SAS® Power and Sample Size Software in SAS/STAT® 9.2 92 http://www2.sas.com/proceedings/forum2008/3682008.pdf

Copyright © 2007, SAS Institute Inc. All rights reserved.

Additional details on Bayesian Statistic

Copyright © 2007, SAS Institute Inc. All rights reserved.

Bayesian Analysis – General Ideas ƒ Frequentist (classical) methods ƒ Bayesian approach • Prior distribution • Observed data • Update belives about the parameter

Copyright © 2007, SAS Institute Inc. All rights reserved.

Details for Bayesian analysis in SAS ƒ Priors • Conjugate Priors: Conjugacy is not used in posterior sampling • Jeffrey Jeffrey‘s s prior: − Used in Proc GENMOD for any generalized linear model − Can be constructed in Proc MCMC

Copyright © 2007, SAS Institute Inc. All rights reserved.

Details for Bayesian analysis in SAS ƒ Inference • MCMC is used to obtain all posterior estimates • Gibbs sampler is used to obtain posterior samples and to update parameters • Random-walk Metropolis algorithm algorithm is used in Proc MCMC • Independence sampler is used in Proc MCMC

ƒ Adaptive rejection sampling algorithm • Proc GENMOD, LIFEREG, PHREG recognize whether a model is log concove and selectes the appropirate sampler

Copyright © 2007, SAS Institute Inc. All rights reserved.

Details for Bayesian analysis in SAS ƒ Statistical diagnostic tests • Gelman-Rubin • Geweke • Heidelberger-Welch Heidelberger Welch • Raftery-Lewis • Autocorrelation • Effective sample size

Copyright © 2007, SAS Institute Inc. All rights reserved.