%@ LANGUAGE="VBScript" %>
<% '
' call from http://marces.org/mdcat/home.htm
Const NIT=48
DIM a(63), b(63), c(63), used(63), giv(63), iui(63), inum(63), top(5), tr, ca(50), cate(50),awh(3)
tr=0
' trial adaptive testing
' session.abandon
awh(1)="3.2"
awh(2)="3.3"
awh(3)="3.5"
pscore=-.4 ' passing score
ii=0
ngg=0 ' number of items used to assess subskill
thisip=request.servervariables("LOCAL_addr")
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub ASPInclude(sname, wr, aca, tca)
Dim nchk,FObject,Instream,StrLIne
set FObject = server.createobject("Scripting.FileSystemObject")
set InStream = FObject.OpenTextFile(sname)
nchk=1
while not InStream.atendofstream
StrLine = InStream.readline
' StrLine=Replace(StrLine,"img src=""", "img src=""/scripts/cat/mdbio/")
' StrLine=Replace(StrLine,"
", " ")
'if wr =1 then
' mark correct answer
goodstr="value="
kk=instr(strline,goodstr)
if kk then
goodstr="value="&tca
k=instr(strline,goodstr)
if k then
kk=k+len(goodstr)
strline=left(strline,kk)&"*" & mid(strline,kk+1)
else
kk=kk+7
strline=left(strline,kk)&" " & mid(strline,kk+1)
end if
if nchk=1 then
goodstr="value=" &aca
k=instr(strline,goodstr)
if k then
kk=k+len(goodstr)-1
strline=left(strline,kk)&" CHECKED" & mid(strline,kk+1)
end if
' StrLine=Replace(StrLine,"""1""", """1"" checked")
end if
end if
'else
' if nchk=1 then
' StrLine = Replace(StrLine,"""0""","""0"" checked")
' end if
'end if
if instr(StrLine,"checked") then nchk=2
response.write(StrLine & vbNewLine)
wend
set Instream=nothing
set FObject = nothing
end sub
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub genicc(th, th2, j,ai,bi,ci,jfl,ii,see,typ,sc)
' typ 1 - Info function
' 2 - icc
' 3 - normal curve and see
' 4 - th x item no
' 5 - see x item no
' sc 0 - percentile
' 1 - z
' 2 MDHSA scale
' 3 - no image
Dim Chart
Set Chart = Server.CreateObject ("ASPChart.Chart")
' sc=0
' if sc=3 then exit sub
if typ=3 then
' superimpose area chart
if th>-2.8 and th< 3.0 and see<2.0 then
low=csng(th)-csng(see)
hi=Csng(th)+csng(see)
if low < -3.0 then low=-2.99
if hi > 3.0 then hi=2.99
Chart.AddSeries (4)
i=vbYellow
select case sc
case 0
low=100*prbz(low)
hi=100*prbz(hi)
case 2
low = 500+100*low
hi=500+100*hi
end select
Chart.addXY low,0,"",i
Chart.addXY low,1,"",i
Chart.addXY hi,1,"",i
Chart.addXY hi,0,"",i
end if
end if
If Typ=2 or typ=3 then
' chart true theta
Chart.AddSeries (8)
i=vbRed
select case sc
case 0
th3=100*prbz(th2)
case 1
th3=th2
case 2
th3=500+100*th2
end select
Chart.AddXY th3,0,"",i
Chart.AddXY th3,1,"",i
' chart pscore
Chart.AddSeries (8)
i=vbGreen
' pscore= 1.5
select case sc
case 0
th4=100*prbz(pscore)
case 1
th4=pscore
case 2
th4=500+100*pscore
end select
Chart.AddXY th4,0,"",i
Chart.AddXY th4,1,"",i
end if
select case typ
case 2,3
Chart.AddSeries (5)
maxp=1 ' used in theta-hat
i = 8080 'to generate a color
select case sc
case 0
alo=5
ahi=95
ast=5
case 1,2
alo=0
ahi=30
ast=2
end select
' For th1=0 to 30 step 2
' ath=(th1-15)/5
for th1 = alo to ahi step ast
select case sc
case 0
ath=zfrpr(th1)
th3=th1
case 1
ath=(th1-15)/5
th3=ath
case 2
ath=(th1-15)/5
th3=500+100*ath
end select
select case typ
case 2
dem = 1 + EXP(-1.7 * ai * (ath - bi))
pr = ci + ((1 - ci) / dem)
case 3
pr=exp(-ath*ath/2) /1 ' sqr(2*3.14)
end select
Chart.AddXY th3,pr,"", i
Next
case 1
i = 8080 'to generate a color
i=vbBlue
maxp=-2
select case sc
case 0
alo=5
ahi=95
ast=5
case 1,2
alo=0
ahi=30
ast=2
end select
'response.write sc & " sc "
for ib=1 to 4
Chart.AddSeries (5)
jj=top(ib)
if ib>1 then i=8080
for th1 = alo to ahi step ast
select case sc
case 0
ath=zfrpr(th1)
th3= th1
case 1
ath=(th1-15)/5
th3=ath
case 2
ath=(th1-15)/5
th3=500+100*ath
end select
pr=probt(ath,jj)
pr= a(jj) * a(jj) * (1 - pr) * (pr - c(jj)) * (pr - c(jj)) / (pr * (1 - c(jj)) * (1 - c(jj)))
Chart.AddXY th3,pr,"", i
if pr>maxp then maxp=pr
Next
next
case 4
Chart.AddSeries (5)
thses=Session("thses")
for ij=1 to ii
th3=mid(thses,5*ij-4,5)
if trim(th3)="" then th3="0"
th1=cSng(th3)
select case sc
case 0
th3=100*prbz(th3)
'case 1
' th3=th3
case 2
th3=500+100*th3
end select
Chart.AddXY ij,th3,"", vbBlack
next
Chart.AddSeries (5)
th4=th2
select case sc
case 0
th4=100*prbz(th2)
case 2
th4=500+100+th2
end select
Chart.AddXY 1,th4,"",vbBlue
Chart.AddXY ii,th4,"",vbBlue
case 5
Chart.AddSeries (5)
seeses=Session("seeses")
' response.write seeses & " "
' thses=Session("thses")
for ij=1 to ii
th3=mid(seeses,4*ij-3,4)
if trim(th3)="" then th3="0"
th3=csng(th3)
select case sc
case 0
th1=mid(thses,5*ij-4,5)
if trim(th1)="" then th1="0"
th1=csng(th1)
low=th1-th3
hi=th3+th1
if low < -2.99 then low=-2.99
if hi > 2.99 then hi=2.99
low=100*prbz(low)
hi=100*prbz(hi)
th3=(hi-low)/2
' case 1
' th3=th3
case 2
th3=100*th3
end select
' response.write ij &" "& th3 &" "
Chart.AddXY ij,th3,"", 8080
next
end select
If typ=1 or typ=3 then
' chart theta-hat
Chart.AddSeries (8)
i=vbBlack
select case sc
case 0
th3=100*prbz(th)
case 1
th3=th
case 2
th3=500+100*th
end select
Chart.AddXY th3,0,"",i
Chart.AddXY th3,maxp,"",i
end if
Chart.BevelOuter = cNone
' Chart.GradientVisible = true
' Chart.GradientStartColor = RGB(&hff, &hff, &hdd) 'vbWhite
' Chart.GradientEndColor = vbYellow
Chart.GradientVisible = false
Chart.ChartBGColor = vbWhite
Chart.PanelColor = vbWhite
Chart.ChartTitleFontColor = vbBlue
Chart.ChartTitleFont.Bold=true
Chart.ChartTitleFont.Size=12
'Chart.HLabelStyle = 2
'Chart.ShowMinorTicks true, true
select case typ
case 1
Chart.ChartTitleAdd "Item Information Functions"
case 2
Chart.ChartTitleAdd "Item Response Function"
Case 3
Chart.ChartTitleAdd "Ability Estimation"
Case 4
Chart.ChartTitleAdd "Ability Estimate x Item Number"
Case 5
Chart.ChartTitleAdd "Standard Error x Item Number"
end select
' was 30*8 and 50*8
Chart.Height = 30*8
Chart.Width = 50*8
Chart.LegendVisible = false
Chart.View3D = false
Chart.JPEGQuality = 60
Chart.ProgressiveJPEGEncoding=True
select case typ
case 1
Chart.AddAxisLabel 1, "Information"
if maxp<1.0 then
Chart.VertAxisMax= 1.0
else
Chart.VertAxisMax= maxp+.1
end if
case 2
Chart.AddAxisLabel 1, "Prob(u=1)"
Case 3
Chart.AddAxisLabel 1, "Frequency"
Chart.VLabelStyle = 1
Case 4, 5
Chart.AddAxisLabel 2, "Items Administered"
end select
if typ<4 then
select case sc
case 0
Chart.AddAxisLabel 2, "Percentile"
case 1
Chart.AddAxisLabel 2, "z"
case 2
Chart.AddAxisLabel 2, "Ability"
end select
else
' Chart.GradientVisible = false
' Chart.ChartBGColor = RGB(&hff, &hff, &hdd)
' Chart.PanelColor = RGB(&hff, &hff, &hdd)
select case sc
case 0
Chart.AddAxisLabel 1, "Percentile"
case 1
Chart.AddAxisLabel 1, "z"
case 2
Chart.AddAxisLabel 1, "Ability"
end select
end if
select case typ
case 1, 2, 3
select case sc
case 0
Chart.HorizAxisMin=0.0 ' -3.0
Chart.HorizAxisMax=100.0 ' 3.0
case 1
Chart.HorizAxisMin= -3.0
Chart.HorizAxisMax= 3.0
case 2
Chart.HorizAxisMin=200 ' -3.0
Chart.HorizAxisMax= 800 ' 3.0
Chart.BottomAxisIncrement = 100
end select
Chart.VertAxisMin = 0
Chart.LeftAxisIncrement = .2
case 4 ' ability estimate x items
select case sc
case 0
Chart.VertAxisMin=0.0 ' -3.0
Chart.VertAxisMax=100.0 ' 3.0
case 1
Chart.VertAxisMin= th2-1.0
Chart.VertAxisMax= th2+1.0
Chart.LeftAxisIncrement=.4
' Chart.BottomAxisIncrement=1/ii
Chart.ShowMinorTicks false, false
case 2
Chart.VertAxisMin=200 ' -3.0
Chart.VertAxisMax= 800 ' 3.0
end select
case 5
select case sc
case 0
Chart.VertAxisMin=0.0 ' -3.0
Chart.VertAxisMax=50.0 ' 3.0
case 1
Chart.VertAxisMin= 0.0
Chart.VertAxisMax= 1.5
Chart.LeftAxisIncrement=.3
Chart.ShowMinorTicks false, false
' Chart.BottomAxisIncrement=1/ii
case 2
Chart.VertAxisMin=0 ' -3.0
Chart.VertAxisMax= 150 ' 3.0
end select
' Chart.BottomAxisIncrement = 1
Chart.HorizAxisMin=1
' response.write "ii "& ii & " "
Chart.HorizAxisMax= ii
end select
rem **********************************************************************
rem * Set the filename, save the image and write the image tag
rem **********************************************************************
kid=Session("kid")
ajfl=jfl & "a"& trim(kid) & trim(typ) & ".jpg"
' Chart.FileName = "g:\www\marces\cgi-bin\temp\" & ajfl
Chart.FileName = "g:\www\ericae\cgi-bin\temp\" & ajfl
Chart.SaveChart
set Chart = nothing
'get rid of old one
ojfl=jfl & "a"& trim(kid-1) & trim(typ) & ".jpg"
ojfl = "g:\www\marces\cgi-bin\temp\" & ojfl
ojfl = "g:\www\ericae\cgi-bin\temp\" & ojfl
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(ojfl)) Then fso.DeleteFile(ojfl)
' response.write ojfl & "exists
"
' else
' response.write ojfl & " nope
"
' end if
set fso = nothing
end sub
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function rsetit (k)
k1=trim(cstr(k))
while len(k1)<3
k1="0" & k1
wend
rsetit=k1
end function
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function afmt (x,d)
' presents x numbers to d decimal places
'response.write x & " " & d &" "
x=csng(x)+0
y=CINT((10^d)*csng(x) )/10^d
y=cstr(y)
if d>0 then
if instr(y,".")=0 then y=y&"."
while len(y)-instr(y,".")5 then
call genicc (th, tr, j,aa,bb,cc,jfl,ii,see,4,1)
call genicc (th, tr, j,aa,bb,cc,jfl,ii,see,5,1)
end if
kid=Session("kid")
ojfl=jfl & "a"& trim(kid) & "1" & ".jpg"
ojfl = "g:\www\marces\scripts\temp\" & ojfl
ojfl = "g:\www\ericae\cgi-bin\temp\" & ojfl
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(ojfl)) Then fso.DeleteFile(ojfl)
ojfl=jfl & "a"& trim(kid) & "2" & ".jpg"
ojfl = "g:\www\marces\scripts\temp\" & ojfl
ojfl = "g:\www\ericae\cgi-bin\temp\" & ojfl
If (fso.FileExists(ojfl)) Then fso.DeleteFile(ojfl)
ojfl=jfl & "a"& trim(kid) & "3" & ".jpg"
ojfl = "g:\www\marces\scripts\temp\" & ojfl
ojfl = "g:\www\ericae\cgi-bin\temp\" & ojfl
If (fso.FileExists(ojfl)) Then fso.DeleteFile(ojfl)
set fso=nothing
%>
Computer Adaptive Test Results
Computer Adaptive Test - Results
<%
'
'Reason for termination:
'SELECT CASE j
' CASE -4
' response.write "More than 40 items have been given"
' CASE -5
' response.write "Standard error < .20."
' CASE -6
' response.write "No informative items left in database."
' CASE -7
' response.write "User terminated."
' CASE -8
' response.write "Change in theta < .10 and see < .3."
' CASE -9
' response.write "Theta out of range."
' CASE ELSE
' response.write "Unknown."
'END SELECT
%>
For the student
Summary
Passing score on the Maryland High School Biology Assessment is <%=500+100*pscore%>
Based on this testing, your estimated score will be <%=afmt(500+100*th,0)%> with a margin of error of <%=afmt(100*see,0)%>. This is
at the <%=afmt(100 * prbz(th),0)%>th percentile.
You appear to have near a <%=afmt(100*prbz((th-pscore)/see),0)%> percent chance of passing the assessment.
Subskill Analysis
The following tables shows how well you did on each skill assessed by the Maryland High School Biology Assessment. You should pay special attention to
areas with scores less than <%=afmt(500+100*pscore,0)%>.
<%
seea=see
bth=92+th*44
if bth<1 then bth=1
if bth>190 then bth=190
if seea>3 then seea=0
owidth=Cint(44*seea)
owidth2=owidth
if owidth<0 or tha<-2 then owidth=0
blankwidth=bth-2-owidth
if blankwidth<0 then
owidth=owidth-blankwidth
blankwidth=0
end if
if owidth2>88 then owidth2=88
if owidth<0 or tha<-2 then owidth=0
%>
Overall
<% response.write "" & afmt(500+100*th,0)
if see> 0 then response.write " +/- "& afmt(100*see,0)
response.write "
"
response.write "
"
bth=92+pscore*44
if bth<1 then bth=1
if bth>190 then bth=190
seea=0
owidth=0
owidth2=0
blankwidth=bth-2-owidth
if blankwidth<0 then
owidth=owidth-blankwidth
blankwidth=0
end if
%>
Passing score
<%=afmt(500+100*pscore,0)%>
>
Sub Skills
<%
for iwh=1 to 4
select case iwh
case 1
str1="1.2 The student will pose scientific questions and suggest experimental approaches to provide answers to questions."
case 2
str1="1.4 The student will demonstrate that data analysis is a vital aspect of the process of scientific inquiry and communication."
case 3
str1="1.6 The student will use mathematical processes."
case 4
str1="3.1 The student will be able to explain the correlation between the structure and function of biologically important molecules and their relationship to cell processes."
end select
%>
<%=str1%>
-
<%
next
afail=0
for iwh=1 to 4
fail(iwh)=0
select case iwh
case 1
str0="3.2"
str1="3.2 The student will demonstrate an understanding that all organisms are composed of cells which can function independently or as part of multicellular organisms."
case 2
str0="3.3"
str1="3.3 The student will analyze how traits are inherited and passed on from one generation to another."
case 4
str0="3.5"
str1="3.5 The student will investigate the interdependence of diverse living organisms and their interactions with the components of the biosphere"
end select
if iwh<>3 then
seea=3
tha=th
CALL getntheta(seea, tha, ii,str0)
' ngg is the number of good items. use it to prevent crashes
bth=92+tha*44
if prbz((tha-pscore)/seea)<.65 and tha<2 then
fail(iwh)=1
afail=1
end if
if bth<1 then bth=1
if bth>190 then bth=190
if seea>3 then seea=0
owidth=Cint(44*seea)
owidth2=owidth
blankwidth=bth-2-owidth
if owidth<0 or tha<-2 then owidth=0
if blankwidth<0 then
owidth=owidth-blankwidth
blankwidth=0
end if
if owidth2>88 then owidth2=88
if owidth<0 or tha<-2 then owidth=0
%>
<%=str1%>
<% if ngg>0 then
response.write "" & afmt(500+100*tha,0)
if seea>0 then response.write " +/- "& afmt(100*seea,0)
response.write "
"
response.write "
"
else
response.write " - "
response.write "
"
end if
else %>
3.4 The student will explain the mechanism of evolutionary change.
-
<%
end if
next
%>
<% if afail=1 then %>
Suggestions
You appear to have done poorly on the following Expectations outlined by the Maryland State Department of Education. You are encouraged to carefully examine these Expectations, Indicators and Resources.
<% if fail(1)=1 then %>
Expectation 3.2 The student will demonstrate an understanding that all
organisms are composed of cells which can function independently or as part of
multicellular organisms.
Indicator 3.2.1
The student will explain the function of structures
found in cellular and multicellular organisms.
Suggested Resources
xxx
xxx
xxx
xxx
<% end if
if fail(2)=1 then %>
Expectation 3.3 The student will analyze how traits are inherited and
passed on from one generation to another.
Indicator 3.3.1
The student will demonstrate that the sorting and
recombination of genes during sexual reproduction has an effect on variation
in offspring.
Indicator 3.3.2
The student will illustrate and explain how expressed
traits are passed from parent to offspring.
Indicator 3.3.3
The student will explain how a genetic trait is
determined by the code in a DNA molecule.
Indicator 3.3.4
The student will describe the effect of gene alteration
on an organism and/or a population.
Suggested Resources
xxx
xxx
xxx
xxx
<% end if
if fail(4)=1 then %>
Expectation 3.5 The student will investigate the interdependence of
diverse living organisms and their interactions with the components of the
biosphere.
Indicator 3.5.1
The student will analyze the relationships among
organisms and between organisms and biotic factors.
Indicator 3.5.2
The student will analyze the interrelationships and
interdependencies among different organisms and explain how these relationships
contribute to the stability of the ecosystem.
Indicator 3.5.3
The student will investigate how natural and man-made
changes in environmental conditions will affect individual organisms and the
dynamics of populations.
Indicator 3.5.4
The student will illustrate how all organisms are part
of and depend on two major global food webs.
Suggested Resources
xxx
xxx
xxx
xxx
<% end if
end if
%>
Review of taken items
<% for i = 1 to ii
j=giv(i)
response.write "
Item " & i & " Indicator " & cate(j) & "
Your response
Correct Response
"
response.write "
"
'sname="g:\www\marces\cgi-bin\cat\mdbio\" & inum(j) & ".htm"
sname="g:\www\marces\mdcat\mdbio\" & inum(j) & ".htm"
Dim nchk,FObject,Instream,StrLIne
set FObject = server.createobject("Scripting.FileSystemObject")
set InStream = FObject.OpenTextFile(sname)
nchk=1
while not InStream.atendofstream
StrLine = InStream.readline
response.write(StrLine & vbNewLine)
wend
set Instream=nothing
set FObject = nothing
response.write "
"
response.write "
" & mid(anss,i,1) & "
"
response.write "
" & ca(j) & "
"
response.write " "
next
%>
Statistical Background
We started with a true score of <%=afmt(500+100*tr,0)%>. After you answered <%=ii%> items, the CAT software extimated your ability as
<%=afmt(500+100*th,0)%> +/-<%=afmt(100*see,0)%>.
<%
't1=csng(th)-cSng(see)
't2=cSng(th)+cSng(see)
'response.write afmt((500+100 * t1),0) & " and " & afmt((500+100*t2),0) & " which is between the "
'
't1=csng(th)-cSng(see)
't2=cSng(th)+cSng(see)
'response.write afmt((100 * prbz(t1)),0) & "th and the " & afmt((100*prbz(t2)),0) & "th percentiles."
%>
Here is the history for this computer adaptive test session:
Item Selection and Response History
(in MDHSA-score units)
Item
Item difficulty bi
Expectation
Prob Correct
Response
Estimated ability
Standard error
<%
isstar=0
for i=1 to ii
' theta-hat history: =thses
' see history: seeses
'th=mid(thses,5*i-4,5)
'see=mid(seeses,4*i-3,4)
th=mid(thses,5*i+1,5)
see=mid(seeses,4*i+1,4)
pr=afmt(probt2(tr,giv(i)),2)
u=" "
star=" "
if iui(i)=0 then
u=" in"
if pr>.5 then star=" **"
else
if pr<.5 then star=" **"
end if
if trim(star) <>"" then istar=1
%>
<%=i%>
<%=afmt(b(giv(i)),2)%>
<%=cate(giv(i))%>
<%=pr%>
<%=u%>correct<%=star%>
<%=afmt(500+100*cstr(th),0)%>
<%=afmt(100*see,0)%>
<% next
if istar=1 then %>
** This response was not expected.
<% end if %>
What to look for:
<% if ii>5 then ab="As shown on the next graph, t" else ab="T" %>
<%=ab%>he estimate of ability generally approaches your given true score as the number of items increases.
<% ' This tutorial will let you go back and change your answers. In practice Not
' allowed as one way to outsmart
' the test is to intentionally miss items which will cause the computer to
' give you easy items. If you go back and get these items right, the computer will
' over estimate your ability. Try it. Intentionally miss the first 5 of 15 items. then
' go back and get them right.
'
if ii>5 then
typ=4
jfl1="http://"& thisip & "/scripts/temp/"&trim(jfl) & "a" & trim(kid) & trim(typ) & ".jpg"
' jfl1="http://"& thisip & "/scripts/temp/"&trim(jfl) & "a" & trim(kid) & trim(typ) & ".jpg"
%>
<%
end if
if istar=1 then bb=" as you did, " else bb=""
%>
If you correctly answered a difficult item or missed an easy item, <%=bb%>
then the estimate of ability starts to deviate away from your true score.
Incorrect responses are followed by an easier item; correct responses by a harder item.
<%=ab%>he standard estimate of ability decreases as the number of items increases. The size of the decrease goes down with each item.
<% if ii>5 then
typ=5
jfl1="http://"& thisip & "/scripts/temp/"&trim(jfl) & "a" & trim(kid) & trim(typ) & ".jpg"
%>
<% end if%>
Once the estimate of ability is near the true score, the probability of a correct response approaches p=.5.
From: Rudner, Lawrence M. (2001). Proof-of-concept for an on-line computer-adaptive-test for MSDE, Maryland Assessment Research Center for Education Success, University of Maryland, College Park http://marces.org/mdcat/
<%
'jfl=Trim(Session("jfl"))
'if len(jfl) > 1 then
' filespec="g:\www\marces\cgi-bin\temp\"& jfl & "*.jpg"
' filespec="g:\www\marces\cgi-bin\temp\*.jpg"
' Dim fso
' Set fso = CreateObject("Scripting.FileSystemObject")
' If (fso.FileExists(filespec)) Then
' response.write " exists."
' fso.DeleteFile(filespec)
' else
' response.write " does not exist."
' end if
' set fso = nothing
'end if
' session.abandon
END SUB
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SUB genhtml2 (see, seeold, ii, th, j,jfl,inum, tr,image,rev,sc,ians)
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'afl="g:\www\marces\cgi-bin\cat\mdbio\" & inum(j) & ".htm"
afl="g:\www\marces\mdcat\mdbio\" & inum(j) & ".htm"
' response.write afl & " "
if sc <> 3 then
kid=session("kid")
kid=kid+1
session("kid")=kid
' call genicc (th, tr, j,a(j),b(j),c(j),jfl,ii,see,1,sc)
' call genicc (th, tr, j,a(j),b(j),c(j),jfl,ii,see,2,sc)
if ii > 4 then call genicc (th, tr, j,a(j),b(j),c(j),jfl,ii,see,3,sc)
' kid=Session("kid")
end if
th1=afmt(th,2)
while len(th1)<5
th1=" " & th1
wend
see1=afmt(see,2)
while len(see1)<4
see1=" " & see1
wend
thses=Session("thses")
seeses=Session("seeses")
thses=left(thses,5*(ii-1)) & th1
seeses=left(seeses,4*(ii-1)) & see1
Session("thses")=thses
Session("seeses")=seeses
%>
<%
g = ""
FOR i = 1 TO ii
aa = " "
aa=rsetit(giv(i))
g = g & aa
NEXT
%>
<%
r = ""
FOR i = 1 TO ii
r = r & TRIM(CSTR(iui(i)))
NEXT
cpr=afmt(probt2(tr,j),2)
if b(j) <-.84 then ity="a very easy"
if b(j)< -.25 and b(j)>-.84 then ity="an easy"
if b(j)<.25 and b(j)>-.25 then ity="an average diffculty"
if b(j)> .25 and b(j)<.84 then ity="a hard"
if b(j) >.84 then ity="a very hard"
%>
(This is <%=ity%> item.)
(The probability of a correct response is <%=cpr%>.)
<% if ii<6 or see > .35 then response.write " Please don't stop yet." %>
<% if ii>4 then
sc0=""
sc1= ""
sc2= ""
sc3=""
select case sc
case 1
sc1=" checked"
case 2
sc2=" checked"
case 3
sc3=" checked"
case 0
sc0=" checked"
end select
%>
Image below & Scale:
>No Images
>Percentile
>z-scores
>MDHSA scores
<% else %>
>
<% end if %>
Background Statistical Information
(The student would not see this)
<% if ii< 5 then
response.write " You have taken "& ii-1 & " items. Detailed information will appear here after 4 items are taken."
else
if sc<>3 then %>
<%
select case sc
case 0
aa="percentile"
cth=afmt(100*prbz(th),0)
ctold=afmt(100*prbz(told),0)
ctr=afmt(100*prbz(tr),0)
case 1
aa= "z-score"
cth=afmt(th,2)
ctold=afmt(told,2)
ctr=afmt(tr,2)
case 2
aa="MDHSA score"
cth=500+100*th
ctold=500+100*told
ctr=500+100*tr
cth=afmt(cth,0)
ctold=afmt(ctold,0)
ctr=afmt(ctr,0)
end select
if cpr<.50000 then
ab="wrong"
sn="<"
else
ab="right"
sn=">"
end if
typ=3
jfl1="http://"& thisip & "/scripts/temp/"&trim(jfl) & "a" & trim(kid) & trim(typ) & ".jpg"
%>
<% sc0=""
sc1= ""
sc2= ""
sc3=""
select case sc
case 1
sc1=" checked"
case 2
sc2=" checked"
case 3
sc3=" checked"
case 0
sc0=" checked"
end select
if ii>4 and 1=2 then
%>
>No Images
>Percentile
>z-scores
>MDHSA scores
<% end if %>
The curve shows the distribution of ability in terms of <%=aa%>s.
The red line shows the true ability (a <%=aa%> score of <%=ctr%>). The green line shows the passing score.
The black line shows the current estimate (a <%=aa%> score of <%=cth%>).
<% if th>-2.8 and th< 3.0 and see<2.0 then %>
The yellow band shows the standard error.
<%else%>
Since we just started, the standard error is extremely large. When the standard error is smaller, it will be shown as a yellow band.
<%end if %>
The goal is to have little error and to have the current estimate reflect true ability.
<% end if %>
Percentiles
MDHSA units
z-score units
True ability
<%=afmt(100*prbz(tr),0)%>
<%=afmt(500+100*tr,0)%>
<%=afmt(tr,2)%>
Passing Score
<%=afmt(100*prbz(pscore),0)%>
<%=afmt(500+100*pscore,0)%>
<%=afmt(pscore,2)%>
<% tmp1=""
if cdbl(tr) < cdbl(pscore) then tmp1="not"
%>
From: Rudner, Lawrence M. (2001). Proof-of-concept for an on-line computer-adaptive-test for MSDE, Maryland Assessment Research Center for Education Success, University of Maryland, College Park http://marces.org/mdcat/
<%
END SUB
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SUB getcom (ii, th, ians, see,iui, jfl, image, rev,sc)
ians = 9 ' default. If no answer then quit testing.
jfl=Session("jfl")
sc=Request("sc")
ii=Request("I")
see=Request("S")
t=Request("T")
tr=Request("TR")
tr2=Cint("0"&Request("TR2"))
if trim(tr)="" then tr=0
if tr2>399 and tr2<601 then tr=(tr2-500)/100
th=t
' which items have been given
g=Request("G")
iresp=trim(Request("U"))
if ii>0 then
FOR i = 1 TO ii
giv(i) = csng(MID(g, i * 3 - 2, 3))
NEXT
' right wrong responses
r=Request("R")
FOR i = 1 TO ii
aa = MID(r, i, 1)
' response.write aa & " "
iui(i) = aa
NEXT
if len(iresp)<>1 then iresp="0"
anss=Session("anss")
anss=left(anss,(ii-1)) & iresp
Session("anss")=anss
end if
ians=0
if ii > 0 then
iresp=iresp + 0
' response.write "
" & iresp & " " & ca(giv(ii)) & "
"
if iresp = ca(giv(ii)) then ians=1
end if
' response.write ians & "
"
'ians=Request("U")
cmd=Request("cmd")
if left(cmd,3)="All" then ians=9
'image=""
'image=request("image")
if sc=3 then image="off" else image="on"
rev=Request("rev")
END SUB
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SUB getntheta (see, th, ii, lmt)
' see - standard error - returned
' th - theta in and updated
' ii - number of administered items
' ui - reposnse (correct=1, else=0)
' lmt - limit analysis to certain categories, "0" to not limit
'
' formula is from Baker () Basics if Item Response Theory, p 66
nl = 0
ngg=1
if len(lmt)=0 then lmt="0"
DO
tdem = 0
tnum = 0
tho = th
ngg=0
nl = nl + 1
FOR i = 1 TO ii
j = giv(i)
lcate=left(cate(j),3)
if lmt="0" or lmt=lcate then
pr = probt(th, j)
tdem = tdem + a(j) * a(j) * pr * (1 - pr)
tnum = tnum + a(j) * (iui(i) - pr)
' response.write "
" & i & " " & iui(i) & " " & pr & " " & th & "
"
ngg = ngg + 1
end if
NEXT
' IF ii < 3 THEN tho = th
' response.write "
" & th
if ngg>0 then th = th + (tnum / tdem)
' response.write " "&th &" "
' IF th > 3 THEN th = 3: tho = 3
' IF th < -3 THEN th = -3: tho = -3
IF th > 3 THEN th = 3
IF th < -3 THEN th = -3
LOOP UNTIL (ABS(th - tho) < .05 OR nl > 100) and (nl>4) or ngg=0
if ngg>0 then see = 1 / SQR(tdem)
' response.write "
"
used(j) = 1
giv(ii) = j
CALL genhtml2(see,seeold, ii, th, j, jfl, inum,tr,image,rev,sc,ians)
response.end
end if
FOR i = 1 TO ii
used(giv(i)) = 1
NEXT
' ians=1 (right)
' ians=2,0 (wrong)
' ians=9 (done)
SELECT CASE ians
CASE 2, 0
iui(ii) = 0
CASE 1
iui(ii) = 1
CASE 9
ii = ii - 1
j = -7
END SELECT
IF ians < 8 THEN
told = th
seeold=see
CALL getntheta(see, th, ii,"0")
if ii> 40 then
j=-4
else
IF see < .020 THEN ' was .20
j = -5
ELSE
j = maxinf(th)
IF j > 0 THEN ' j=-6 if no good items left
used(j) = 1
ii = ii + 1
giv(ii) = j
END IF
' END IF
END IF
END IF
END IF
IF j > 0 THEN
CALL genhtml2(see,seeold, ii, th, j, jfl,inum, tr,image,rev,sc,ians)
response.END
ELSE
CALL gendone(see, th, ii, j, tr,jfl,sc)
response.END
END IF
response.END
%>