get file = "....all_logs_79196". execute. *******re-calibrate "grade" to be the grade based on cohort and study year. Thus, students beginning study in Kindergarten in year 1 should be in 1st grade in year 2 *******whether they are promoted or not they remain with their cohort in order to be able to compare instruction received in one set of schools versus another set of schools *******with no assumptions made about having similar retention/promotion policies across the set of schools IF ((stucohrt='A2000' & (wave='2F' or wave='2W' or wave='2S')) or (stucohrt='A2001' & (wave='3F' or wave='3W' or wave='3S'))) gradenew = 1 . EXECUTE . IF ((stucohrt='A2000' & (wave='3F' or wave='3W' or wave='3S')) or (stucohrt='A2001' & (wave='4F' or wave='4W' or wave='4S'))) gradenew = 2 . EXECUTE . IF ((stucohrt='B2000' & (wave='1F' or wave='1W' or wave='1S')) or (stucohrt='B2001' & (wave='2F' or wave='2W' or wave='2S'))) gradenew = 3 . EXECUTE . IF ((stucohrt='B2000' & (wave='2F' or wave='2W' or wave='2S')) or (stucohrt='B2001' & (wave='3F' or wave='3W' or wave='3S'))) gradenew = 4 . EXECUTE . IF ((stucohrt='B2000' & (wave='3F' or wave='3W' or wave='3S')) or (stucohrt='B2001' & (wave='4F' or wave='4W' or wave='4S'))) gradenew = 5 . EXECUTE . ****Creata "days" variable to be used in analysis in order to investigate linear and non-linear trends (days squared) in data over time RECODE wave ('1F'=1) ('1W'=1) ('1S'=1) ('2F'=2) ('2W'=2) ('2S'=2) ('3F'=3) ('3W'=3) ('3S'=3) ('4F'=4) ('4W'=4) ('4S'=4) INTO wavenum . EXECUTE . COMPUTE day1 = XDATE.TDAY(logdate) . EXECUTE . IF (wavenum=1) day1=days1-152681. execute. IF (wavenum=1) day=day1+22. execute. IF (wavenum=2) day1=days1-153045. execute. IF (wavenum=2) day=day1+21. execute. IF (wavenum=3) day1=days1-153409. execute. IF (wavenum=3) day=day1+20. execute. IF (wavenum=4) day1=days1-153773. execute. IF (wavenum=4) day=day1+19. execute. compute dayssq = days*days. execute. ****Create day of the week variable in order to investigate trends across days of the week compute monday=0. compute tuesday=0. compute wedsday=0. compute thursday=0. compute friday=0. execute. do if wavenum=1 and (days=22 or days=29 or days=36 or days=43 or days=50 or days=57 or days=64 or days=71 or days=78 or days=85 or days=92 or days=99 or days=106 or days=113 or days=120 or days=127 or days=134 or days=141 or days=148 or days=155 or days=162 or days=169 or days=176 or days=183 or days=190 or days=197 or days=204 or days=211 or days=218 or days=225 or days=232 or days=239 or days=246 or days=253). compute monday=1. end if. execute. do if wavenum=1 and (days=23 or days=30 or days=37 or days=44 or days=51 or days=58 or days=65 or days=72 or days=79 or days=86 or days=93 or days=100 or days=107 or days=114 or days=121 or days=128 or days=135 or days=142 or days=149 or days=156 or days=163 or days=170 or days=177 or days=184 or days=191 or days=198 or days=205 or days=212 or days=219 or days=226 or days=233 or days=240 or days=247 or days=254). compute tuesday=1. end if. execute. do if wavenum=1 and (days=24 or days=31 or days=38 or days=45 or days=52 or days=59 or days=66 or days=73 or days=80 or days=87 or days=94 or days=101 or days=108 or days=115 or days=122 or days=129 or days=136 or days=143 or days=150 or days=157 or days=164 or days=171 or days=178 or days=185 or days=192 or days=199 or days=206 or days=213 or days=220 or days=227 or days=234 or days=241 or days=248 or days=255). compute wedsday=1. end if. execute. do if wavenum=1 and (days=25 or days=32 or days=39 or days=46 or days=53 or days=60 or days=67 or days=74 or days=81 or days=88 or days=95 or days=102 or days=109 or days=116 or days=123 or days=130 or days=137 or days=144 or days=151 or days=158 or days=165 or days=172 or days=179 or days=186 or days=193 or days=200 or days=207 or days=214 or days=221 or days=228 or days=235 or days=242 or days=249 or days=256). compute thursday=1. end if. execute. do if wavenum=1 and (days=26 or days=33 or days=40 or days=47 or days=54 or days=61 or days=68 or days=75 or days=82 or days=89 or days=96 or days=103 or days=110 or days=117 or days=124 or days=131 or days=138 or days=145 or days=152 or days=159 or days=166 or days=173 or days=180 or days=187 or days=194 or days=201 or days=208 or days=215 or days=222 or days=229 or days=236 or days=243 or days=250 or days=257). compute friday=1. end if. execute. do if wavenum=2 and (days=21 or days=28 or days=35 or days=42 or days=49 or days=56 or days=63 or days=70 or days=77 or days=84 or days=91 or days=98 or days=105 or days=112 or days=119 or days=126 or days=133 or days=140 or days=147 or days=154 or days=161 or days=168 or days=175 or days=182 or days=189 or days=196 or days=203 or days=210 or days=217 or days=224 or days=231 or days=238 or days=245 or days=252). compute monday=1. end if. execute. do if wavenum=2 and (days=22 or days=29 or days=36 or days=43 or days=50 or days=57 or days=64 or days=71 or days=78 or days=85 or days=92 or days=99 or days=106 or days=113 or days=120 or days=127 or days=134 or days=141 or days=148 or days=155 or days=162 or days=169 or days=176 or days=183 or days=190 or days=197 or days=204 or days=211 or days=218 or days=225 or days=232 or days=239 or days=246 or days=253). compute tuesday=1. end if. execute. do if wavenum=2 and (days=23 or days=30 or days=37 or days=44 or days=51 or days=58 or days=65 or days=72 or days=79 or days=86 or days=93 or days=100 or days=107 or days=114 or days=121 or days=128 or days=135 or days=142 or days=149 or days=156 or days=163 or days=170 or days=177 or days=184 or days=191 or days=198 or days=205 or days=212 or days=219 or days=226 or days=233 or days=240 or days=247 or days=254). compute wedsday=1. end if. execute. do if wavenum=2 and (days=24 or days=31 or days=38 or days=45 or days=52 or days=59 or days=66 or days=73 or days=80 or days=87 or days=94 or days=101 or days=108 or days=115 or days=122 or days=129 or days=136 or days=143 or days=150 or days=157 or days=164 or days=171 or days=178 or days=185 or days=192 or days=199 or days=206 or days=213 or days=220 or days=227 or days=234 or days=241 or days=248 or days=255). compute thursday=1. end if. execute. do if wavenum=2 and (days=25 or days=32 or days=39 or days=46 or days=53 or days=60 or days=67 or days=74 or days=81 or days=88 or days=95 or days=102 or days=109 or days=116 or days=123 or days=130 or days=137 or days=144 or days=151 or days=158 or days=165 or days=172 or days=179 or days=186 or days=193 or days=200 or days=207 or days=214 or days=221 or days=228 or days=235 or days=242 or days=249 or days=256). compute friday=1. end if. execute. do if wavenum=3 and (days=20 or days=27 or days=34 or days=41 or days=48 or days=55 or days=62 or days=69 or days=76 or days=83 or days=90 or days=97 or days=104 or days=111 or days=118 or days=125 or days=132 or days=139 or days=146 or days=153 or days=160 or days=167 or days=174 or days=181 or days=188 or days=195 or days=202 or days=209 or days=216 or days=223 or days=230 or days=237 or days=244 or days=251 or days=258). compute monday=1. end if. execute. do if wavenum=3 and (days=21 or days=28 or days=35 or days=42 or days=49 or days=56 or days=63 or days=70 or days=77 or days=84 or days=91 or days=98 or days=105 or days=112 or days=119 or days=126 or days=133 or days=140 or days=147 or days=154 or days=161 or days=168 or days=175 or days=182 or days=189 or days=196 or days=203 or days=210 or days=217 or days=224 or days=231 or days=238 or days=245 or days=252 or days=259). compute tuesday=1. end if. execute. do if wavenum=3 and (days=22 or days=29 or days=36 or days=43 or days=50 or days=57 or days=64 or days=71 or days=78 or days=85 or days=92 or days=99 or days=106 or days=113 or days=120 or days=127 or days=134 or days=141 or days=148 or days=155 or days=162 or days=169 or days=176 or days=183 or days=190 or days=197 or days=204 or days=211 or days=218 or days=225 or days=232 or days=239 or days=246 or days=253 or days = 260). compute wedsday=1. end if. execute. do if wavenum=3 and (days=23 or days=30 or days=37 or days=44 or days=51 or days=58 or days=65 or days=72 or days=79 or days=86 or days=93 or days=100 or days=107 or days=114 or days=121 or days=128 or days=135 or days=142 or days=149 or days=156 or days=163 or days=170 or days=177 or days=184 or days=191 or days=198 or days=205 or days=212 or days=219 or days=226 or days=233 or days=240 or days=247 or days=254 or days = 261). compute thursday=1. end if. execute. do if wavenum=3 and (days=24 or days=31 or days=38 or days=45 or days=52 or days=59 or days=66 or days=73 or days=80 or days=87 or days=94 or days=101 or days=108 or days=115 or days=122 or days=129 or days=136 or days=143 or days=150 or days=157 or days=164 or days=171 or days=178 or days=185 or days=192 or days=199 or days=206 or days=213 or days=220 or days=227 or days=234 or days=241 or days=248 or days=255 or days=262). compute friday=1. end if. execute. do if wavenum=4 and (days=19 or days=26 or days=33 or days=40 or days=47 or days=54 or days=61 or days=68 or days=75 or days=82 or days=89 or days=96 or days=103 or days=110 or days=117 or days=124 or days=131 or days=138 or days=145 or days=152 or days=159 or days=166 or days=173 or days=180 or days=187 or days=194 or days=201 or days=208 or days=215 or days=222 or days=229 or days=236 or days=243 or days=250 or days=257). compute monday=1. end if. execute. do if wavenum=4 and (days=20 or days=27 or days=34 or days=41 or days=48 or days=55 or days=62 or days=69 or days=76 or days=83 or days=90 or days=97 or days=104 or days=111 or days=118 or days=125 or days=132 or days=139 or days=146 or days=153 or days=160 or days=167 or days=174 or days=181 or days=188 or days=195 or days=202 or days=209 or days=216 or days=223 or days=230 or days=237 or days=244 or days=251 or days=258). compute tuesday=1. end if. execute. do if wavenum=4 and (days=21 or days=28 or days=35 or days=42 or days=49 or days=56 or days=63 or days=70 or days=77 or days=84 or days=91 or days=98 or days=105 or days=112 or days=119 or days=126 or days=133 or days=140 or days=147 or days=154 or days=161 or days=168 or days=175 or days=182 or days=189 or days=196 or days=203 or days=210 or days=217 or days=224 or days=231 or days=238 or days=245 or days=252 or days=259). compute wedsday=1. end if. execute. do if wavenum=4 and (days=22 or days=29 or days=36 or days=43 or days=50 or days=57 or days=64 or days=71 or days=78 or days=85 or days=92 or days=99 or days=106 or days=113 or days=120 or days=127 or days=134 or days=141 or days=148 or days=155 or days=162 or days=169 or days=176 or days=183 or days=190 or days=197 or days=204 or days=211 or days=218 or days=225 or days=232 or days=239 or days=246 or days=253 or days = 260). compute thursday=1. end if. execute. do if wavenum=4 and (days=23 or days=30 or days=37 or days=44 or days=51 or days=58 or days=65 or days=72 or days=79 or days=86 or days=93 or days=100 or days=107 or days=114 or days=121 or days=128 or days=135 or days=142 or days=149 or days=156 or days=163 or days=170 or days=177 or days=184 or days=191 or days=198 or days=205 or days=212 or days=219 or days=226 or days=233 or days=240 or days=247 or days=254 or days = 261). compute friday=1. end if. execute. *****Create "holiday" variable to mark days on or near significant holidays during our logging periods to be used in analysis compute holiday=0. execute. do if wavenum=1 and (days=30 or days=52 or days=53 or days=136 or days=138 or days=141 or days=162 or days=166 or days=194 or days=197 or days=236 or days=239). compute holiday=1. end if. execute. do if wavenum=2 and (days=30 or days=51 or days=52 or days=53 or days=136 or days=137 or days=140 or days=165 or days=179 or days=235 or days=238). compute holiday=1. end if. execute. do if wavenum=3 and (days=30 or days=41 or days=57 or days=58 or days=59 or days=108 or days=111 or days=136 or days=139 or days=167 or days=213 or days=216 or days=199 or days=202). compute holiday=1. end if. execute. do if wavenum=4 and (days=30 or days =41 or days=41 or days=56 or days=57 or days=58 or days=135 or days=138 or days=167 or days=191 or days=194 or days=240 or days=243). compute holiday=1. end if. execute. *****Create respondent id's -- made respondents unique by "gradenew" level (respidg). Since some teachers were in schools where looping occurred they sometimes *****filled out data for logging students in consecutive years. These are treated as unique classrooms in the data since there are no assumptions made that the students *****remained exactly the same and while the teacher may remain the same, instruction should vary by the grade level of the students being taught - thus these *****instances were treated as a unique entry in the data. string schlid2(a4). compute schlid2=substr(schoolid,8). execute. string studnum(a3). compute studnum=substr(stuid,13). execute. string studid2(a7). compute studid2=concat(schlid2,studnum). execute. string respnum(a3). compute respnum=substr(respid,13). execute. string resp_id2(a7). compute resp_id=concat(schlid,respnum). execute. string schlid(a8). compute schlid = concat(blank4,schlid2). execute. string studntid(a8). compute studntid=concat(blank1,studid2). execute. string resp_id(a8). compute resp_id = concat(blank1,resp_id2). execute. string respidg(a9). compute respidg = concat(resp_id,grdestr). execute. string resp_id(a7). compute resp_id=substr(respidg,2). execute. ****Transforming gateway items recode rcll4a rcll4b rcll4c rcll4d rcll4e rcll4f rcll4g rcll4h rcll4i (0=0) (1=0) (2=1) (3=2) (4=3) into mcmprhns mwriting mwrdanal mcncptpr mfluency mvocab mgrammar mspllng mrsrchst. execute. formats mcmprhns mwriting mwrdanal mcncptpr mfluency mvocab mgrammar mspllng mrsrchst (F1.0). val labels mcmprhns mwriting mwrdanal mcncptpr mfluency mvocab mgrammar mspllng mrsrchst 0 = "not taught" 1 = "touched on briefly" 2 = "minor focus" 3 = "major focus". execute. ****Created dichotomous gateway items - minor or major focus = 1; not taught or touched on = 0 ****When running analyses on gateway items each dichotomous variable was entered and all lessons over the entire year - including teacher and student ****absences - were used. We ended up omitting "concepts of print" from analysis because of it's exclusive focus in the lower grades and "research strategies" ****because of it's limited usage at all grade levels recode mcmprhns mwriting mwrdanal mcncptpr mfluency mvocab mgrammar mspllng mrsrchst (0=0) (1=0) (2=1) (3=1) into cmprhnsd writingd wrdanald cncptpd rdflncyd vocabd grmmrd spllngd rsrchstd. execute. variable labels cmprhnsd "dichotomous var indicating focus on comprehension" writingd "dichotomous var indicating focus on writing" wrdanald "dichotomous var indicating focus on word analysis" cncptpd "dichotomous var indicating focus on concepts of print" rdflncyd "dichotomous var indicating focus on reading fluency" vocabd "dichotomous var indicating focus on vocabulary" grmmrd "dichotomous var indicating focus on grammar" spllngd "dichotomous var indicating focus on spelling" rsrchstd "dichotomous var indicating focus on research strategies". val labels cmprhnsd writingd wrdanald cncptpd rdflncyd vocabd grmmrd spllngd rsrchstd 0 = "not a focus" 1 = "minor or major focus". execute. *****Create dichotomous variables indicating focus on particular literacy strategies *****When running analyses on these non-gateway items we did not use all lessons. We first read into HLM the corpus of lessons that had e.g. word analysis *****as a focus then examined the dichotomous word analysis items created below (llc.. set). Thus we examined the topics done in word analysis when it was *****taught. We did the same iteratively for reading comprehension items (reading into HLM only lessons where reading comprehension were taught) and for writing *****items. compute preread=0. compute graphs=0. compute strystrc=0. compute analyze=0. compute chkund=0. compute brfans=0. compute stdisc=0. compute extansw=0. compute tchdem=0. compute lttrsnd=0. compute sghtwrd=0. compute prfxsffx=0. compute cntxtpic=0. compute phncscue=0. compute c3acd=0. compute c4abc=0. compute prewrtng=0. compute litrygnr=0. compute wrtprac=0. compute revise=0. compute edit=0. compute share=0. compute tchled2=0. compute tchrcmnt=0. compute intgtcmp=0. compute intgtwrt=0. compute numstrcm=0. compute numstrwa=0. compute numstrwr=0. execute. do if (lla1a = 1 or lla1b = 1) . recode preread (0=1). end if. execute. do if (lla1g = 1 or lla1h = 1) . recode graphs (0=1). end if. execute. do if (lla1i = 1 or lla1m = 1 or lla1n = 1 or lla1q = 1) . recode strystrc (0=1). end if. execute. do if (lla1p = 1 or lla1r = 1). recode analyze (0=1). end if. execute. do if (lla1j = 1 or lla1k = 1 or lla1l = 1). recode chkund (0=1). end if. execute. do if (lla3a = 1 or lla3e = 1 or lla3f = 1 or lla3h = 1). recode brfans (0=1). end if. execute. do if (lla3b = 1 or lla3c = 1 or lla3d = 1). recode stdisc (0=1). end if. execute. do if (lla3g = 1 or lla3i = 1 or lla3j = 1). recode extansw (0=1). end if. execute. do if (lla4a=1 or lla4b=1 or lla4c=1). recode tchdem (0=1). end if. execute. do if (llc1a=1 or llc1b=1 or llc1c=1 or llc1d=1 or llc1e=1 or llc1f=1 or llc1g=1 or llc1h=1 or llc1i=1 or llc1j=1). recode lttrsnd (0=1). end if. execute. do if (llc1k=1). recode sghtwrd (0=1). end if. execute. do if (llc1l=1). recode prfxsffx (0=1). end if. execute. do if (llc1m=1). recode cntxtpic (0=1). end if. execute. do if (llc1n=1). recode phncscue (0=1). end if. execute. do if (llc3a=1 or llc3c=1 or llc3d=1). recode c3acd (0=1). end if. execute. do if (llc4a=1 or llc4b=1 or llc4c=1). recode c4abc (0=1). end if. execute. do if (llb1a=1 or llb1b=1). compute prewrtng=1. end if. execute. do if (llb1c=1 or llb1d=1). compute litrygnr=1. end if. execute. do if (llb1e=1). compute wrtprac=1. end if. execute. do if (llb1f=1 or llb1g=1). compute revise=1. end if. execute. do if (llb1h=1 or llb1i=1). compute edit=1. end if. execute. do if llb1j=1. compute share=1. end if. execute. do if (llb3f=1 or llb3g=1). compute tchrcmnt=1. end if. execute. do if (llb3a=1 or llb3b=1 or llb3c=1 or llb3e=1 or llb3h=1). compute tchled2=1. end if. execute. do if (mcmprhns>1 and (lla1s=1 or lla1t=1 or llb1c=1 or llb3c=1)). compute intgtcmp=1. end if. execute. do if (mwriting>1 and (lla1s=1 or lla1t=1 or lla3i=1 or lla3j=1)). compute intgtwrt=1. end if. execute. count numstrcm = preread strystrc analyze chkund brfans stdisc extansw tchdem intgtcmp(1). count numstrwa = lttrsnd sghtwrd prfxsffx cntxtpic phncscue c3acd c4abc (1). count numstrwr = prewrtng litrygnr wrtprac revise edit share tchrcmnt tchled2 intgtwrt (1). execute. variable labels dcmprhns "dichotomous variable indicating whether comprehension was a focus" dwriting "dichotomous variable indicating whether writing was a focus" dwrdanal "dichotomous variable indicating whether word analysis was a focus" preread "'pre-reading items' dichotomous indicating items a1a or a1b checked" graphs "'visual items' dichotomous indicating items a1g or a1h checked" strystrc "'story structure' dichotomous indicating items a1i or a1m or a1n or a1q checked" analyze "'analysis and evaluate items' dichotomous indicating items a1p or a1r or a1s checked" analyze "'analysis and evaluate items' dichotomous indicating items a1p or a1r checked" chkund "'check for understanding' dichotomous indicating items a1j or a1k or a1l checked" brfans "'provide brief answers' dichotomous indicating items a3a or a3e or a3f or a3h checked" stdisc "'students discuss text' dichotomous indicating items a3b or a3c or a3d checked" extansw "'extended comp. answers' dichotomous indicating items a3g or a3i or a3j checked" tchdem "'teacher demonstrated or explained in comprehension' a4a or a4b or a4c checked" lttrsnd "'letter sound relationships worked on including segmenting and/or blending' c1a thru c1j" sghtwrd "'sight words a focus of lesson' c1k" prfxsffx "'worked on understanding structural analysis of words' c1l" cntxtpic "'used context or picture cues to read words in sentences' c1m" phncscue "'used phonics cues to read words' c1n" c3acd "'teacher direct instruction in word analysis' checked c3a or c3c or c3d" c4abc "'assessment of student reading ability' checked c4a or c4b or c4c" prewrtng "'worked on pre-writing' checked b1a or b1b" litrygnr "'worked on literary techniques or genre study' checked b1c or b1d" wrtprac "'students wrote for practice' b1e" revise "'work on revising own story or text' checked b1f or b1g" edit "'work on editing own story or text' checked b1h or b1i" share "'shared own story with others' b1j" tchled2 "'teacher led production of writing as example' checked b3a or b3b or b3c or b3e or b3h" tchrcmnt "'teacher commented on student writing' checked b3f or b3g" intgtcmp "'teacher integrated writing when working on comprehension' checked a1s or a1t or b1c or b3c" intgtwrt "'teacher integrated comp when working on writing' checked a1s or a1t or a3i or a3j" numstrcm "number of strategies worked on in comprehension" numstrwa "number of strategies worked on in word analysis" numstrwr "number of strategies worked on in writing" execute. compute infrmtnl = lla2a. compute litshrt = lla2d. compute chpbook = lla2e. execute. do if lla2b=1 or lla2c=1. compute cntrpred=1. end if. execute. compute wrtwrds=llb2a. compute wrtsntnc=llb2b. compute wr1prgrh=llb2c. compute wrprgrhs=llb2d. execute. variable labels infrmtnl "used informational text in reading comprehension" litshrt "used literature based short selection in comprehension" chpbook "used chapter book in comprehension" cntrpred "used text with controlled or predictable language in comprehension" wrtwrds "wrote letter strings or words" wrtsntnc "wrote seperate sentences" wr1prgrh "wrote seperate paragraph(s)" wrprgrhs "wrote connected paragraphs" execute.