{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "b19d0366", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "SAS Connection established. Subprocess id is 1525051\n", "\n", "\n", "21 ods listing close;ods html5 (id=saspy_internal) file=stdout options(bitmap_mode='inline') device=svg style=HTMLBlue; ods\n", "21 ! graphics on / outputfmt=png;\n", "\u001b[38;5;21mNOTE: Writing HTML5(SASPY_INTERNAL) Body file: STDOUT\u001b[0m\n", "22 \n", "23 data mydata;\n", "24 input id name $;\n", "25 datalines;\n", "\u001b[38;5;21mNOTE: The data set WORK.MYDATA has 3 observations and 2 variables.\u001b[0m\n", "\u001b[38;5;21mNOTE: DATA statement used (Total process time):\n", " real time 0.00 seconds\n", " cpu time 0.00 seconds\n", " \u001b[0m\n", "29 ;\n", "30 \n", "31 \n", "32 ods html5 (id=saspy_internal) close;ods listing;\n", "\n" ] } ], "source": [ "data mydata;\n", " input id name $;\n", " datalines;\n", " 1 Alex\n", " 2 Bob\n", " 3 Clara\n", ";\n" ] }, { "cell_type": "code", "execution_count": 3, "id": "455d1def", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "34 ods listing close;ods html5 (id=saspy_internal) file=stdout options(bitmap_mode='inline') device=svg style=HTMLBlue; ods\n", "34 ! graphics on / outputfmt=png;\n", "\u001b[38;5;21mNOTE: Writing HTML5(SASPY_INTERNAL) Body file: STDOUT\u001b[0m\n", "35 \n", "36 libname mydata \"Datasets/\";\n", "\u001b[38;5;21mNOTE: Libref MYDATA was successfully assigned as follows: \n", " Engine: V9 \n", " Physical Name: /project/scv/examples/sas/tutorials/Introduction/Datasets\u001b[0m\n", "37 \n", "38 \n", "39 ods html5 (id=saspy_internal) close;ods listing;\n", "\n" ] } ], "source": [ "libname mydata \"Datasets/\"; \n" ] }, { "cell_type": "code", "execution_count": 4, "id": "2adccf6d", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "SAS Output\n", "\n", "\n", "\n", "
\n", "
\n", "

The SAS System

\n", "
\n", "
\n", "

The UNIVARIATE Procedure

\n", "

Variable: Height

\n", "
\n", "
\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
Moments
N19Sum Weights19
Mean67.8105263Sum Observations1288.4
Std Deviation4.58280539Variance21.0021053
Skewness0.37699295Kurtosis-0.3628529
Uncorrected SS87745.12Corrected SS378.037895
Coeff Variation6.75825073Std Error Mean1.05136766
\n", "
\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
Basic Statistical Measures
LocationVariability
Mean67.81053Std Deviation4.58281
Median67.30000Variance21.00211
Mode62.50000Range16.70000
  Interquartile Range4.20000
\n", "
\n", "

Note: The mode displayed is the smallest of 4 modes with a count of 2.

\n", "
\n", "
\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
Tests for Location: Mu0=0
TestStatisticp Value
Student's tt64.49744Pr > |t|<.0001
SignM9.5Pr >= |M|<.0001
Signed RankS95Pr >= |S|<.0001
\n", "
\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
Quantiles (Definition 5)
LevelQuantile
100% Max76.5
99%76.5
95%76.5
90%75.0
75% Q369.5
50% Median67.3
25% Q165.3
10%62.5
5%59.8
1%59.8
0% Min59.8
\n", "
\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
Extreme Observations
LowestHighest
ValueObsValueObs
59.8469.518
62.51373.511
62.5574.816
62.8375.015
65.3676.519
\n", "
\n", "
\n", "
\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ods trace on;\n", "proc univariate data=mydata.med_visits;\n", "\tvar Height ;\n", "run;\n", "ods trace off;\n" ] }, { "cell_type": "code", "execution_count": 5, "id": "0c40c524", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "SAS Output\n", "\n", "\n", "\n", "
\n", "
\n", "

The SAS System

\n", "
\n", "
\n", "

The UNIVARIATE Procedure

\n", "

Variable: Height

\n", "
\n", "
\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
Basic Statistical Measures
LocationVariability
Mean67.81053Std Deviation4.58281
Median67.30000Variance21.00211
Mode62.50000Range16.70000
  Interquartile Range4.20000
\n", "
\n", "

Note: The mode displayed is the smallest of 4 modes with a count of 2.

\n", "
\n", "
\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
Extreme Observations
LowestHighest
ValueObsValueObs
59.8469.518
62.51373.511
62.5574.816
62.8375.015
65.3676.519
\n", "
\n", "
\n", "
\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ods select BasicMeasures ExtremeObs;\n", "proc univariate data=mydata.med_visits;\n", "\tvar Height ;\n", "run;" ] }, { "cell_type": "code", "execution_count": null, "id": "70c0e9af", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "SAS", "language": "sas", "name": "sas" }, "language_info": { "codemirror_mode": "sas", "file_extension": ".sas", "mimetype": "text/x-sas", "name": "sas" } }, "nbformat": 4, "nbformat_minor": 5 }