Recently, I find out how convenient to include some summaries statistics in a statistical graph with a statement called INSET. An INSET statement places a box or table of summary statistics, called an inset, directly in a graph created with a CDFPLOT, HISTOGRAM, PPPLOT, PROBPLOT, or QQPLOT statement. INSET statement is available in many SAS procedures (Proc Univeriate, Proc Boxplot, Proc Lifereg,...).
If we run the following program in SAS, the INSET statement used in Proc Univariate will place a box on the left corner of the CDF graph to indicate the mean and standard deviation.
data Cord;label Strength="Breaking Strength (psi)";input Strength @@;datalines;6.94 6.97 7.11 6.95 7.12 6.70 7.13 7.34 6.90 6.837.06 6.89 7.28 6.93 7.05 7.00 7.04 7.21 7.08 7.017.05 7.11 7.03 6.98 7.04 7.08 6.87 6.81 7.11 6.746.95 7.05 6.98 6.94 7.06 7.12 7.19 7.12 7.01 6.846.91 6.89 7.23 6.98 6.93 6.83 6.99 7.00 6.97 7.01;run;title 'Cumulative Distribution Function of Breaking Strength';proc univariate data=Cord noprint;histogram strength /normal;cdf Strength / normal;inset normal(mu sigma);run;
The following are more examples of using INSET statements:
- Adding Insets with Descriptive Statistics
- Univariate Analysis and Normality Test Using SAS
- Positioning an Inset Using Compass Point Values
- INSET statement in Proc Lifereg
- INSET statement in Proc Boxplot
- INSET statement in Proc Probit
- Creating Statistical Graphics in SAS 9.2: What Every Statistical User Should Know where TEST=LOGRANK suboption instead of INSET statement is used
- Displaying Regression Equations and Special Characters in Regression Fit Plots where INSET statement is used in PROC SGPLOT
- Now You Can Annotate Your Statistical Graphics Procedure Graph
No comments:
Post a Comment