Biostatistics Lab
STAT 2023L
Fall 2011
Instructor:
Office:
E-mail:
Class website:
Richard Wanjohi
SCEN 332
[email protected]
http:/comp.uark.edu/~rwanjohi/BioStats/bs.html
Lab Times
The labs will be held in SCEN 320
Section 1 meets on Tuesday from 2:00 2:
Graphics
Numerical Measures
Descriptive Statistics
Biostatistics Lab
Fall 2011
Richard Wanjohi
Descriptive Statistics
Graphics
Numerical Measures
Graphs
Procedures in SAS
Graphs
These includes:
Bar Graphs and Histograms
Pie and Donut charts
Block charts
S
if then statement
Data me3;
set me;
if Gender = f then sex =
Female;
else sex = Male;
run;
if then statement
Data me3;
set me;
if class = 4 then Level = Senoir ;
else if class = 3 then Level = Junior;
else Level = Sophomore;
run;
D M:
Create new datase
Import data
Using the import wizard.
Will import comfortably: .xls, .csv, .txt,
(Can also import other formats using External
File Interface facility in the import wizard)
Click on file > import data > select data source
(format) > next > browse >
in
Reading data into SAS
You can manually type in your data OR
Copy and paste your data on the raw data
section.
SAS can read data from an external file in these
formats: .txt, .prn, .dat, .csv, .xls, .xlsx
e.t.c
We will look at Infile statement and
How
today
Character vs numeric variables
Length of variables
Labels
Comments
Title(s)
Character variables
data three;
input Name $ Age weight;
datalines;
John 21 120
Mike 19
160
Lisa 16 155
Ray 23 489
Lebronjones 45 132
;
run;
Dollar sign
Length of variables
Biostatistics Lab
Fall 2011
Richard Wanjohi
Biostatistics
Science of collecting
analyzing
and interpreting data
Paper and Pencil
Use statistical
software
using statistical theory and methods to
address problems in the biological and
health sciences
Dat
Homework 8
File data8 in our web contains data of randomized double-blind, controlled study conducted in 1989 to
determine the safety and efficacy of a particular compound in treatment of scleroderma, a multi-system
skin disease characterized by thickenin
Homework 7
Use data2 on our web to
1) Generate a two-way table for diastolic blood pressure for the 6 groups of gender by marital
status. Which group is healthier?
2) Generate summary statistics and construct graphs (stem and leaf, boxplot and histogram)f
Homework 6 ( Due week of 11/7/2011)
File Data4 in our class web contains systolic and diastolic blood pressure readings for men and women
who either lead an athletic or sedentary lifestyle.
a) Use proc means to produce summary statistics for systolic and
Homework 5 (due week of 10/31)
1) Data6 on our web is an excel file that contains data collected from a water well by the Utah
Division of Water Quality. The water quality is monitored by measuring particulate levels. This
data shows nitrate, zinc, and to
Homework 4 (Due week of 10/3/2011)
Data4 Data5 on our web are 2 excel files containing data of 40 individuals under study in a clinical
research. Note that the data was collected from the same 40 individuals at 2 different times hence the 2
separate files
Homework 3 (due week of 9/19)
Data3 in our class website is a dataset in an excel file. It contains 8 variables and 49 observations. It is a
class roster of a Biostatistics class showing results of 5 tests administered in spring semester.
a) Save the data
Homework 2 (Due next lab meeting: week of 9/12/2011)
data2 in our class website is a dataset in an excel file. It contains 7 variables and 20 observations.
a) Save the data as a text file (Tab delimited or .txt ) in location of your own choice- i.e. eithe
Homework 1
Write SAS program to read and print each of the following data sets.
1)
Species ID
2367
2445
2342
4789
1326
1456
2301
Class
Mammalian
Reptilia
Mammalian
Bird
Amphibian
Fish
Mammalian
Animal
Elephant
Snake
Giraffe
Hawk
Frog
Shark
Man
Brain weigh