04.08.2013 Views

User Guide for the TIMSS International Database.pdf - TIMSS and ...

User Guide for the TIMSS International Database.pdf - TIMSS and ...

User Guide for the TIMSS International Database.pdf - TIMSS and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

P E R F O R M I N G A N A L Y S E S C H A P T E R 9<br />

Figure 9.9<br />

SAS Control Statements <strong>for</strong> Per<strong>for</strong>ming Analyses with Student-Level Variables<br />

(EXAMPLE1.SAS)<br />

options nocenter;<br />

* Read <strong>the</strong> variables from <strong>the</strong> student file;<br />

data student;<br />

set bsgall1<br />

(keep=idcntry idgrader jkindic jkzone totwgt bsbgday1 bimatscr);<br />

where idgrader=2 <strong>and</strong> nmiss(bsbgday1)=0; * Select only 8th graders;<br />

if bsbgday1=1 <strong>the</strong>n bsbgday1=2;<br />

* Define <strong>the</strong> <strong>for</strong>mat <strong>for</strong> <strong>the</strong> variables used;<br />

proc <strong>for</strong>mat library=work;<br />

value grade 1 = "Seventh Grade " 2 = "Eighth Grade ";<br />

value seetv 2 = "Less than 1 Hr " 3 = "1 to 2 hrs. "<br />

4 = "3 to 5 hrs. " 5 = "More than 5 hrs ";<br />

value country<br />

036 = "Australia " 040 = "Austria " 056 = "Belgium (Fl) "<br />

057 = "Belgium (Fr) " 100 = "Bulgaria " 124 = "Canada "<br />

170 = "Colombia " 196 = "Cyprus " 200 = "Czech Republic "<br />

208 = "Denmark " 826 = "Engl<strong>and</strong> " 250 = "France "<br />

280 = "Germany " 300 = "Greece " 344 = "Hong Kong "<br />

348 = "Hungary " 352 = "Icel<strong>and</strong> " 364 = "Iran, Islamic Rep. "<br />

372 = "Irel<strong>and</strong> " 376 = "Israel " 380 = "Italy "<br />

392 = "Japan " 410 = "Korea " 414 = "Kuwait "<br />

428 = "Latvia (LSS) " 440 = "Lithuania " 528 = "Ne<strong>the</strong>rl<strong>and</strong>s "<br />

554 = "New Zeal<strong>and</strong> " 578 = "Norway " 608 = "Philippines "<br />

620 = "Portugal " 642 = "Romania " 643 = "Russian Federation "<br />

827 = "Scotl<strong>and</strong> " 702 = "Singapore " 201 = "Slovak Republic "<br />

890 = "Slovenia " 717 = "South Africa " 724 = "Spain "<br />

752 = "Sweden " 756 = "Switzerl<strong>and</strong> " 764 = "Thail<strong>and</strong> "<br />

840 = "United States" ;<br />

* Now use <strong>the</strong> macro JACK to get <strong>the</strong> results;<br />

%include "jack.sas";<br />

%jack (totwgt,jkzone,jkindic,75,idcntry idgrader bsbgday1,bimatscr,student);<br />

proc print data=final noobs;<br />

by idcntry idgrader;<br />

where idgrader = 2;<br />

var bsbgday1 N totwgt mnx mnx_se pct pct_se;<br />

<strong>for</strong>mat idcntry country. idgrader grade. bsbgday1 seetv.;<br />

T I M S S D A T A B A S E U S E R G U I D E 9 - 2 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!