BookmarkSubscribeRSS Feed
RHL
Calcite | Level 5 RHL
Calcite | Level 5
I've tried to use the ExcelXP tagset to run Proc Univariate with a class variable. It gives me results but the analysis and class variables are not shown at all. What can be done to fix this?
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You really need to share your SAS code and likely the generated SAS log output from your program.

Scott Barry
SBBWorks, Inc.
RHL
Calcite | Level 5 RHL
Calcite | Level 5
Here's the SAS code I used.

ods listing close;
ODS tagsets.excelxp
path = "C:\Data\My Documents\Excel"
file = "UnivSample.xls"
style = custom2
options(sheet_interval = 'none'
embedded_titles = 'yes'
embed_titles_once = 'yes'
sheet_name='SrvCont1'
default_column_width = '15'
center_horizontal = 'yes');

title "Accounts Booked in 2008";

proc univariate data=all;
class product;
var srvcont1 ;
title2 "Service Contract 1";
run;

ODS tagsets.excelxp close;
ods listing;



Here's a copy of the partial output I got in Excel. (I'm not sure if I could post the actual Excel file. ) Notice that the analysis variable srvcont1 is not seen anywhere, and neither is the product. There happens to be 3 products but I'm only showing the top 2.

Accounts Booked in 2008
Service Contract 1

Moments
N 93343 Sum Weights 93343
Mean 879.39534 Sum Observations 82085399.2
Std Deviation 769.234688 Variance 591722.005
Skewness 0.20723914 Kurtosis -1.1727747
Uncorrected SS 1.27418E+11 Corrected SS 55232500000
Coeff Variation 87.4731367 Std Error Mean 2.51778118

Basic Statistical Measures
Location Variability
Mean 879.3953 Std Deviation 769.23469
Median 955 Variance 591722
Mode 0 Range 3665
Interquartile Range 1475

Tests for Location: Mu0=0
Test Statistic p Value
Student's t t 349.2739 Pr > |t| <.0001
Sign M 29754.5 Pr >= |M| <.0001
Signed Rank S 885350000 Pr >= |S| <.0001

Quantiles (Definition 5)
Quantile Estimate
100% Max 3665
99.00% 2300
95.00% 2190
90.00% 1995
75% Q3 1475
50% Median 955
25% Q1 0
10.00% 0
5.00% 0
1.00% 0
0% Min 0

Extreme Observations
Lowest Highest
Value Obs Value Obs
0 738641 3300 727662
0 738640 3300 727755
0 738639 3300 727781
0 738638 3300 728039
0 738637 3665 618008

Accounts Booked in 2008
Service Contract 1

Moments
N 611373 Sum Weights 611373
Mean 665.24175 Sum Observations 406710844
Std Deviation 807.94359 Variance 652772.845
Skewness 0.62615602 Kurtosis -1.1758352
Uncorrected SS 6.69648E+11 Corrected SS 3.99087E+11
Coeff Variation 121.451125 Std Error Mean 1.03330353

Basic Statistical Measures
Location Variability
Mean 665.2418 Std Deviation 807.94359
Median 0 Variance 652773
Mode 0 Range 3995
Interquartile Range 1435

Tests for Location: Mu0=0
Test Statistic p Value
Student's t t 643.8009 Pr > |t| <.0001
Sign M 134475 Pr >= |M| <.0001
Signed Rank S 18080000000 Pr >= |S| <.0001

Quantiles (Definition 5)
Quantile Estimate
100% Max 3995
99.00% 2300
95.00% 2100
90.00% 1888
75% Q3 1435
50% Median 0
25% Q1 0
10.00% 0
5.00% 0
1.00% 0
0% Min 0

Extreme Observations
Lowest Highest
Value Obs Value Obs
0 611373 3895 326353
0 611370 3900 155055
0 611369 3995 147796
0 611368 3995 152958
0 611367 3995 330405

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 724 views
  • 0 likes
  • 2 in conversation