Study Guides (283,462)
CA (135,423)
York (10,978)
BIOL (591)
BIOL 2060 (18)
Joel Shore (14)

BIOL 2060 Study Guide - Problem Set, Descriptive Statistics, Mercedes-Benz M180 Engine

23 Pages
102 Views
Fall 2011

Department
Biology
Course Code
BIOL 2060
Professor
Joel Shore

This preview shows pages 1-3. Sign up to view the full 23 pages of the document.
Problem set #1
1) Ensure that you are able to access the statistical program, SAS, at the university
"acadlabs". You will need to login using your PASSPORT YORK username and
password, so make sure you know what those are. If you have forgotten, I suppose you
can find out how to obtain them at the helpdesk in one of the computer labs.
There is one such computer lab in the William Small Centre, for example.
SOME FIRST NOTES ON USING SAS.
I'LL DO SOME DEMONSTRATIONS ON USING SAS IN CLASS SOON.
For now here's a brief description and some examples.
CLICK THE SAS 93 ICON TO RUN SAS
When your run SAS there are three windows.
The Editor window, the Log window and the Results viewer
window.
Editor window: You enter your data set and the necessary
SAS statements to carry out a particular analysis
Log window: It will contain a listing of the analyses you
have run along with any errors you might have made so it is
important to examine this window after each analysis you do
to ensure there weren't any errors.
Results window: It contains the output from your analyses.
If you've made some critical errors, it might contain
nothing, or it might contain something that is meaningless.
(check the Log window!).
Setting up your data for SAS in the SAS editor.
1. The first few lines (or statements) in a SAS editor will
be used to tell SAS a number of things about your data set.
2. Then your data will follow those statements.
3. Then you'll tell SAS what analyses to carryout.
So here's an example data set (which you should try to run
in SAS).
So let's imagine I've gone out an measured the weight of
cellphones of 5 randomly sampled males and 5 females and I
want to obtain some descriptions descriptive statistics:
(For purposes of illustration, I will put keywords used by
SAS in bold but they don't need to be in bold in the actual
program you'll run).
Either type or cut-and-past this SAS program into the SAS
program editor. Click on the "running person" icon at the
top menu of SAS, and the program should run successfully.
DATA CELLPHONE;
INPUT GENDER $ WEIGHT;
CARDS;
M 12
M 14
M 10
M 9
M 13
F 11
F 15
F 13
F 12
F 11
;
PROC SORT;
BY GENDER;
PROC MEANS MEAN N STD STDERR;
PROC UNIVARIATE;
PROC MEANS MEAN N STD STDERR;
BY GENDER;
RUN;
An explanation of the various SAS statements follows:
The first statement, the DATA CELLPHONE;
The keyword DATA is recognized by SAS and it is usually the
first statement in a data set. The word that follows is one
you make up that is informative to you. It probably
shouldn't be too long, nor should it have spaces in it, nor
should it be a SAS keyword (like don't say DATA DATA;).
Note that SAS statements are typically all followed by a
semicolon ";". The lines of data are not.
INPUT statement.
INPUT is a SAS keyword that tells SAS how your data are
organized. So in my data set I had two things that
described each individual in the data set. One was their
gender (M or F) the other was the weight of the cellphone
in grams. I made up the names of the variables using names
that were informative to me, but not too long (and that
weren't SAS keywords).
Note that if one of the variables is to be read in as
alphanumeric information (i.e. it is a categorical nominal
variable) then you follow the name of that variable with a
dollar sign, $
So in the INPUT statement I said GENDER $.
WEIGHT IS A NUMERIC VARIABLE (READS IN ONLY NUMBERS) SO IT
IS JUST LISTED AS WEIGHT.
CARDS; This statement tells SAS that the data will follow
next. It is a holdover from the days when computer cards
were used. If you like, you could use the statement
DATALINES; instead of CARDS;.
Then the data follow.
The failsafe way to input your data is to have each
individual (or subject) on a separate line where you list
all the things you've measured on that individual. Then you
do the next individual and so on.
Following all the lines of data, I put a line containing
only a semi colon. This may not be necessary but I normally
do it. In this way, your data are enclosed in a statement
CARDS; and they end with a final single ;
After the data, you then tell SAS what to do with your
data. Various SAS analyses are called procedures and are
preceeded by the word PROC and then the name of the
procedure.
PROC SORT;
BY GENDER;
It is normally a good idea to sort your data and indeed a
number of SAS procedures require that it is sorted in a
particular way.
So the two statements above tells SAS to sort the data by
gender (even though I'd already input in a sorted form, I
did this any way).
PROC MEANS MEAN N STD STDERR;
This is from procedure MEANS and tells SAS to find the
mean, sample size standard deviation (STD) and standard
error of the mean (STDERR) for the whole data set. I did
it for purpose of illustration. The procedure written in

Loved by over 2.2 million students

Over 90% improved by at least one letter grade.

Leah — University of Toronto

OneClass has been such a huge help in my studies at UofT especially since I am a transfer student. OneClass is the study buddy I never had before and definitely gives me the extra push to get from a B to an A!

Leah — University of Toronto
Saarim — University of Michigan

Balancing social life With academics can be difficult, that is why I'm so glad that OneClass is out there where I can find the top notes for all of my classes. Now I can be the all-star student I want to be.

Saarim — University of Michigan
Jenna — University of Wisconsin

As a college student living on a college budget, I love how easy it is to earn gift cards just by submitting my notes.

Jenna — University of Wisconsin
Anne — University of California

OneClass has allowed me to catch up with my most difficult course! #lifesaver

Anne — University of California
Description
Problem set 11 Ensure that you are able to access the statistical program SAS at the university acadlabsYou will need to login using your PASSPORT YORK username and password so make sure you know what those are If you have forgotten I suppose you can find out how to obtain them at the helpdesk in one of the computer labs There is one such computer lab in the William Small Centre for exampleSOME FIRST NOTES ON USING SASILL DO SOME DEMONSTRATIONS ON USING SAS IN CLASS SOONFor now heres a brief description and some examplesCLICK THE SAS 93 ICON TO RUN SASWhen your run SAS there are three windowsThe Editor window the Log window and the Results viewer windowEditor window You enter your data set and the necessary SAS statements to carry out a particular analysisLog window It will contain a listing of the analyses you have run along with any errors you might have made so it is important to examine this window after each analysis you do to ensure there werent any errorsResults window It contains the output from your analyses If youve made some critical errors it might contain nothing or it might contain something that is meaninglesscheck the Log windowSetting up your data for SAS in the SAS editor1 The first few lines or statements in a SAS editor will be used to tell SAS a number of things about your data set2 Then your data will follow those statements3 Then youll tell SAS what analyses to carryoutSo heres an example data set which you should try to run in SASSo lets imagine Ive gone out an measured the weight of cellphones of 5 randomly sampled males and 5 females and I want to obtain some descriptions descriptive statisticsFor purposes of illustration I will put keywords used by SAS in bold but they dont need to be in bold in the actual program youll runEither type or cutandpast this SAS program into the SAS program editor Click on the running person icon at the top menu of SAS and the program should run successfullyDATA CELLPHONEINPUT GENDERWEIGHTCARDSM 12M 14M 10M 9M 13F 11F 15F 13F 12F 11PROC SORTBY GENDERPROC MEANS MEAN N STD STDERRPROC UNIVARIATEPROC MEANS MEAN N STD STDERRBY GENDERRUNAn explanation of the various SAS statements followsThe first statement the DATA CELLPHONEThe keyword DATA is recognized by SAS and it is usually the first statement in a data set The word that follows is one you make up that is informative to you It probably shouldnt be too long nor should it have spaces in it nor should it be a SAS keyword like dont say DATA DATANote that SAS statements are typically all followed by a semicolonThe lines of data are notINPUT statementINPUT is a SAS keyword that tells SAS how your data are organized So in my data set I had two things that described each individual in the data set One was their gender M or F the other was the weight of the cellphone in grams I made up the names of the variables using names that were informative to me but not too long and that werent SAS keywords
More Less
Unlock Document

Only pages 1-3 are available for preview. Some parts have been intentionally blurred.

Unlock Document
You're Reading a Preview

Unlock to view full version

Unlock Document

You've reached the limit of 4 previews this month

Create an account for unlimited previews.

Already have an account?

Log In


OR

Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit