lab4_sol - more detail later. It also uses a pdf function...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/* RH Rieger */ /* September 26, 2008 */ /* LAB4.SAS */ /* Dataset = raw data */ /* Windows 2000 */ * options nodate ps=60 ls=78; o *Doing this by brute force; * data temp; input x; pi=22/7; sigma=1; mu=0; norm = (1/((sqrt(2*pi)*sigma))*exp ( - (X-mu)**2 / (2*(sigma**2))) ); datalines; -5 -4.75 -4.5 -4.25 -4 -3.75 -3.5 -3.25 -3 -2.75 -2.5 -2.25 -2 -1.75 -1.5 -1.25 -1 -.75 -.5 -.25 0 .25 .5 .75 1 1.25 1.5 1.75 2 2.25 2.5 2.75 3 3.25 3.5 3.75 4 4.25 4.5 4.75 5
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
; run; r *A more elegant approach. This uses do-loops something we will cover in
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: more detail later. It also uses a pdf function to calculate the normal density. SAS has functions for commonly used functions like the one for norm that we typed, by hand, above; n data temp2; do X=-5 to 5 by 0.25; d norm=pdf('NORMAL',X,0,1); n output; end; run; r proc print data=temp; run; r proc gplot data=temp; plot norm*X; run; quit; q proc gplot data=temp2; plot norm*X; run; quit; q...
View Full Document

This note was uploaded on 10/01/2009 for the course STA 511 taught by Professor Scottmcclintock during the Spring '09 term at West Chester.

Page1 / 2

lab4_sol - more detail later. It also uses a pdf function...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online