Novel Methods for Time Series Data in Clinical Studies

MISSING IMAGE

Material Information

Title:
Novel Methods for Time Series Data in Clinical Studies
Physical Description:
1 online resource (62 p.)
Language:
english
Creator:
Savenkov, Oleksandr
Publisher:
University of Florida
Place of Publication:
Gainesville, Fla.
Publication Date:

Thesis/Dissertation Information

Degree:
Doctorate ( Ph.D.)
Degree Grantor:
University of Florida
Degree Disciplines:
Statistics
Committee Chair:
Wu, Samuel S
Committee Members:
Ghosh, Malay
Khare, Kshitij
Pardalos, Panagote M

Subjects

Subjects / Keywords:
design -- series -- single -- subject -- time
Statistics -- Dissertations, Academic -- UF
Genre:
Statistics thesis, Ph.D.
bibliography   ( marcgt )
theses   ( marcgt )
government publication (state, provincial, terriorial, dependent)   ( marcgt )
born-digital   ( sobekcm )
Electronic Thesis or Dissertation

Notes

Abstract:
Single subject or n-of-1 research designs have been widely used to evaluate treatment interventions. Many statistical procedures, such as: split-middle trend lines, regression trend line, Shewart-chart trend line, binomial tests, randomization tests and Tryon C statistics have been used to analyze single-subject data, but they fail to control Type I error due to serially dependent time series observations. In this work we present an improved intervention analysis model for dynamic characteristics of an intervention effect in a short series of single subject data. There are several potential difficulties that may arise, and one of them is that the series of data can be relatively short. To address this issue we derived exact likelihood function, that allows us to get estimates in more direct way than approximate algorithms, which fail to converge for short series. Since we consider short series, the chi-squared approximation to the null distribution for the test statistics may not be valid. In order to test the treatment effect, we develop the hypothesis testing procedure. The methods are illustrated with a real clinical trial on constraint-induced language therapy for aphasia patients. In the second part of this work we provide an overview of several approaches to measure the similarity/dissimilarity between time series. The main goal is to develop the framework that would allow to investigate group difference in time series. This problem rely on the ability to measure the distance between time series. In this work we develop a novel approach to measure the similarity between time series, cross-fitting measure. The proposed measure can be also applied to time series clustering problems.
General Note:
In the series University of Florida Digital Collections.
General Note:
Includes vita.
Bibliography:
Includes bibliographical references.
Source of Description:
Description based on online resource; title from PDF title page.
Source of Description:
This bibliographic record is available under the Creative Commons CC0 public domain dedication. The University of Florida Libraries, as creator of this bibliographic record, has waived all rights to it worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
Statement of Responsibility:
by Oleksandr Savenkov.
Thesis:
Thesis (Ph.D.)--University of Florida, 2012.
Local:
Adviser: Wu, Samuel S.
Electronic Access:
RESTRICTED TO UF STUDENTS, STAFF, FACULTY, AND ON-CAMPUS USE UNTIL 2013-08-31

Record Information

Source Institution:
UFRGP
Rights Management:
Applicable rights reserved.
Classification:
lcc - LD1780 2012
System ID:
UFE0044593:00001


This item is only available as the following downloads:


Full Text

PAGE 1

NOVELMETHODSFORTIMESERIESDATAINCLINICALSTUDIESByOLEKSANDRV.SAVENKOVADISSERTATIONPRESENTEDTOTHEGRADUATESCHOOLOFTHEUNIVERSITYOFFLORIDAINPARTIALFULFILLMENTOFTHEREQUIREMENTSFORTHEDEGREEOFDOCTOROFPHILOSOPHYUNIVERSITYOFFLORIDA2012

PAGE 2

2012OleksandrV.Savenkov 2

PAGE 3

ThisdissertationisdedicatedtothememoryofMarkC.K.Yang 3

PAGE 4

ACKNOWLEDGMENTS TherearemanypeoplewithoutwhosesupportandencouragementIwouldnotbeabletocompletethisdegree.Firstandforemost,IwouldliketothankmyadvisorProfessorSamWu.IamgratefultoSamfordedicatingsomuchtimeandeortstomydissertation.IwouldlikealsotothankmyrstPhDadvisor,ProfessorMarkYang,whotaughtmetoworkhard.Arealsadnessisthathepassedawayin2010.IwouldliketothankProfessorMalayGhoshandProfessorKshitijKhareforservinginmyPhDcommitteeandgivingmevaluableadvices.Ifeelgratefultomycollaboratorsandmentors,ProfessorPanosPardalos,whoisalsoinmyPhDcommittee,andFrankSkidmore,forintroducingnewexcitingareasofresearchtome.Iamverygratefultomyfriendsandmentors,ProfessorVladimirBoginskiandProfessorSergiyButenko,fortheirinvaluablehelpandencouragement.Thankyou.IwouldliketothankmypeersandthefacultymembersattheDepartmentofStatistics.Finally,Iwouldliketothankmyfamily.Although,theyarethousandsmilesawayfromme,Ifeeltheirloveandsupporteveryday. 4

PAGE 5

TABLEOFCONTENTS page ACKNOWLEDGMENTS ................................... 4 LISTOFTABLES ...................................... 6 LISTOFFIGURES ..................................... 7 ABSTRACT ......................................... 8 CHAPTER 1INTERVENTIONANALYSISFORSINGLE-SUBJECTSTUDIES .......... 10 1.1Introduction ................................... 10 1.2AnImprovedModel ............................... 12 1.3TheTestProcedure ............................... 19 1.4SimulationStudies ................................ 21 1.5CaseStudy .................................... 24 1.6Conclusions ................................... 24 2ANALYSISOFVARIANCEBASEDONCROSS-FITTINGMEASUREOFSIMI-LARITYANDPERMUTATIONTEST ........................ 31 2.1Introduction ................................... 31 2.2LiteratureReview ................................ 31 2.3MeasureofDistancebyARMACoecients ................... 33 2.4TheCross-FittingMeasureofSimilarity ..................... 34 2.5ANOVABasedonCross-FittingMeasureofSimilarityandPermutationTest 38 2.6Conclusions ................................... 38 APPENDIX ALIKELIHOODFUNCTION .............................. 39 BCROSS-FITTINGDISTANCE ............................. 45 CRCODEFOREVALUATINGMLE .......................... 47 DMATLABCODEFOREVALUATINGMLE ...................... 51 REFERENCES ........................................ 59 BIOGRAPHICALSKETCH ................................. 62 5

PAGE 6

LISTOFTABLES Table page 1-1MSEandBiasfor=(30,0.8,0.6) ......................... 21 1-2MSEandBiasfor=(30,0,0) ........................... 21 1-3Casestudyresults ................................... 25 6

PAGE 7

LISTOFFIGURES Figure page 1-1SeveralCommonMeanFunctions ........................... 14 1-2EstimatedmeanfunctionsforanARprocess ..................... 22 1-3EstimatedmeanfunctionsforanARMAprocess ................... 23 1-4IntensiveCILT ..................................... 26 1-5DistributedCILT .................................... 27 1-6IntensivePACE .................................... 28 1-7DistributedPACE ................................... 29 2-1ComparisonofthreestationaryAR(1)timeseries ................... 37 7

PAGE 8

AbstractofDissertationPresentedtotheGraduateSchooloftheUniversityofFloridainPartialFulllmentoftheRequirementsfortheDegreeofDoctorofPhilosophyNOVELMETHODSFORTIMESERIESDATAINCLINICALSTUDIESByOleksandrV.SavenkovAugust2012Chair:SamuelS.WuMajor:StatisticsSinglesubjectorn-of-1researchdesignshavebeenwidelyusedtoevaluatetreatmentinterventions.Manystatisticalprocedures,suchas:split-middletrendlines,regressiontrendline,Shewart-charttrendline,binomialtests,randomizationtestsandTryonCstatisticshavebeenusedtoanalyzesingle-subjectdata,buttheyfailtocontrolTypeIerrorduetoseriallydependenttimeseriesobservations.Inthisworkwepresentanimprovedinterventionanalysismodelfordynamiccharacteris-ticsofaninterventioneectinashortseriesofsinglesubjectdata.Thereareseveralpotentialdicultiesthatmayarise,andoneofthemisthattheseriesofdatacanberelativelyshort.Toaddressthisissuewederivedexactlikelihoodfunction,thatallowsustogetestimatesinmoredirectwaythanapproximatealgorithms,whichfailtoconvergeforshortseries.Sinceweconsidershortseries,thechi-squaredapproximationtothenulldistributionfortheteststatisticsmaynotbevalid.Inordertotestthetreatmenteect,wedevelopthehypothesistestingprocedure.Themethodsareillustratedwitharealclinicaltrialonconstraint-inducedlanguagetherapyforaphasiapatients.Inthesecondpartofthisworkweprovideanoverviewofseveralapproachestomeasurethesimilarity/dissimilaritybetweentimeseries.Themaingoalistodeveloptheframeworkthatwouldallowtoinvestigategroupdierenceintimeseries.Thisproblemrelyontheabilitytomeasurethedistancebetweentimeseries.Inthisworkwedevelopanovelapproachtomeasure 8

PAGE 9

thesimilaritybetweentimeseries,cross-ttingmeasure.Theproposedmeasurecanbealsoappliedtotimeseriesclusteringproblems. 9

PAGE 10

CHAPTER1INTERVENTIONANALYSISFORSINGLE-SUBJECTSTUDIES 1.1IntroductionSingle-subjectdesignshavebeenusedwidelyfordecades,particularlyinthebehavioralsciences,butstatisticalanalysisofsuchstudiesremainsproblematic,primarilybecausesuchdataaregenerallyautocorrelatedandtheobservationseriesisshort.Thepurposeofthisworkistointroduceanewanalysismodelthatimprovesthecurrentmethodsofdrawingconclusionsfromsingle-subjectstudies.Inatypicalsingle-subjectdesign,repeatedobservationsaremadeonthelonesubjectduringabaselineperiodandasubsequenttreatmentperiod.Thebaselinemeasurementsareintendedtoestablishastablereferencepoint,andalso,incasesofrecentinjuryorotheraictionfromwhichspontaneousimprovementmightbeexpected,toestimatetherateofimprovementpriortotreatment.Afterthesubjectisexposedtotheintervention,theobservationscontinueinanattempttoestablishcorrespondingtreatment-periodvalues.Investigatorsthendesiretotesttwonullhypotheses:1)thereisnodierenceinoveralloutcomebetweenthebaselineandtreatmentperiods,and2)thereisnodierenceintherateofchangeinoutcomebetweenthetwoperiods.Whenspontaneousimprovementbeforetreatmentdoesnotoccur(i.e.,theslopeofthebaselinedataisnon-positive),rejectionofthersthypothesisisenoughtoshowthatthetreatmentiseective.Inothercases,rejectionofbothhypothesesisrequired[ 1 ].Visualanalysisisthetraditionalandstillwidelyusedmethodofapproachingsuchstudies[ 1 ].Thedataareplottedacrosstime,withaverticallineseparatingthebaselineandtreatmentperiods.Investigatorstheneyeballthedataandmakeinformalconclusionsabouttheeectivenessoftheintervention.Asonemightimagine,thismethodishighlysubjectiveandhenceunreliable,withonelargemeta-analysisndinganoverallinter-rateragreementcoecientofonly0.58[ 2 ].Toaddressthisconcern,researchershaveproposedvarioustoolstoaidvisualanalysisandmakeitsconclusionsmorerobust.Inthesplit-middletrendlinemethod[ 3 ],thebaselinedataaredividedinhalfandalineisdrawnthroughtheirrespectivemedians. 10

PAGE 11

Thesameprocedureisappliedtothetreatmentdata,andthelevelandslopeofthetwolinesarequalitativelycompared.Thecelerationtrendlinemethod[ 4 ]isidentical,exceptthelinesextendthroughmeansratherthanmedians.Separateregressionlinesthroughthebaselineandtreatmentdataalsoaresometimesplottedandvisuallycompared.Noneofthesemethods,however,hasbeenshowntooermuchimprovementinthereliabilityofvisualanalysis,withTypeIerrorratesremainingashighas84%[ 5 { 9 ].Methodsthataremorestatisticallyorientedalsooftenareused.TheShewartprocedure[ 4 10 ]setsreferencelinestwostandarddeviationsaboveandbelowthemeanofthebaselinedata.Iftwosuccessivedatapointsinthetreatmentperiodfalloutsidethosebounds,oneinferthatsignicantchangehasoccurred.Binomialtestscomparetheproportionoftreatmentpointsthatfallaboveandbelowthebaselinesplit-medianorcelerationline.T-testsaresometimesperformedbetweenthebaselineandtreatmentmeans,andTryon'sC-statistic[ 11 ]isfrequentlyusedtocompareslopes.Theautocorrelationofsingle-subjectdatacausessuchteststobeinvalid,however,andTypeIerrorratesremainunacceptablyhighwhenautocorrelationispresent[ 12 { 15 ].Gottman[ 16 ]denedinterrupted-time-seriesanalysis(ITSA)forastreamofseriallydependentobservationsacrosstwoexperimentalperiods.Basedonttingautoregressiveparameters,themethodyieldsthreetests:anFtestofthenullhypothesisthatnooverallchangehasoccurredbetweenthetwoperiods,andt-testsfordierencesinmeansandslopes.Crosbie[ 17 ]showedthattheITSAmethodunderestimatedpositiveautocorrelationandhencecouldnotmaintainTypeIerrorcontrolwhenthebaselineandtreatmentobservationswererelativelyfew(lessthan50observationspertimeperiod),makingtheITSAmethodinapplicabletomostclinicalsettings.CrosbieproposedacorrectedversionofITSA,calledITSACORR,whichcouldhandleshortertimeseriesandhassincebeenwidelyemployed.ITSACORR,however,failstocontrolTypeIerrorforautocorrelationshigherthan0.6andsamplesizeslessthan20,anditalsoassumesthattheinterventioneectisalineartrendchangefrombaseline,whichisnotappropriateinmanyapplications,suchastheexamples 11

PAGE 12

wegiveinourillustrativeexamplesection.Inaddition,Rosner,Munoz,etal.[ 18 ]andRosnerandMunoz[ 19 ]presentautoregressivemodelsthatuseregressionmethodstorelatechangeinresponsevariablestoexplanatoryvariables.Inthiswork,weconsideranimprovedinterventionanalysismodel[ 20 ]fordynamiccharac-teristicsofaninterventioneectinashortseriesofsingle-subjectdata.ThestatisticalmodelispresentedinSection2.ThemaximumlikelihoodestimatesarederivedandahypothesistestingprocedureisproposedinSection3.Themethodsareillustratedwitharealclinicaltrialonconstraint-inducedlanguagetherapyforaphasiapatientsinSection4. 1.2AnImprovedModelSupposethedataYt,t=1,...,nareavailableasaseriesobservedatequaltimeintervals.WeassumethatthetimeseriesisthesubjecttointerventionattimeTandthetimeTisknown.ThepartofthetimeseriesYt,t
PAGE 13

(B)=1)]TJ /F3 11.955 Tf 11.95 0 Td[(1B)]TJ /F3 11.955 Tf 11.95 0 Td[(2B2)]TJ /F6 11.955 Tf 11.96 0 Td[(...)]TJ /F3 11.955 Tf 11.96 0 Td[(qBqInthisworkweconsiderthecaseofasingleintervention.Weshouldmentionthatsuchmodelsarenotrestrictedtosingleinterventionandseveralmeanfunctionscanbecombinedformoresophisticatedinterventioneects.Thereareseveralpossibleresponsepatterns,thatdependonthechoiceofthemeanfunctionf(t).Amongothers,wecanconsiderfollowingmeanfunctions f(t)=!BIt f(t)=!B 1)]TJ /F15 7.97 Tf 6.59 0 Td[(BIt f(t)=!B 1)]TJ /F13 7.97 Tf 6.59 0 Td[(BItAnindicatorfunctionItisgivenbyIt=8>><>>:0,iftT;1,o/w. (1{2)ShorttimeinterventioneectscanbespeciedusingthepulsefunctionPt=8>><>>:1,ift=T;0,o/w.Clearly,(1)]TJ /F12 11.955 Tf 11.95 0 Td[(B)It=PtThus,withoutlossofgenerality,weconsidermodelswiththestepfunctionIt.Inthispaper,weassumethatf(t)followsarst-orderdynamicmodelforintervention,withthetransferfunctionoftheform f(t)=!B 1)]TJ /F3 11.955 Tf 11.96 0 Td[(BIt,(1{3) 13

PAGE 14

Figure1-1. SeveralCommonMeanFunctions 14

PAGE 15

where!,areunknownparameters,with0<<1,andBisthebackwardshiftoperator[ 21 ].Thisimpliesthatf(t)=8>><>>:0,iftT;!(1)]TJ /F3 11.955 Tf 11.96 0 Td[(t)]TJ /F13 7.97 Tf 6.59 0 Td[(T)=(1)]TJ /F3 11.955 Tf 11.95 0 Td[(),ift>T. (1{4)Suchtransferfunctionmodelisappropriatewhentheresponseisnotexpectedtobeimmedi-ate.Suchassumptionsseemtobereasonableinclinicalstudies.Ingeneral,itisdesirabletochosetheformofthetransferfunctionbasedontheinforma-tionaboutmechanismsthatcausethechange.WealsoassumethatNtfollowsanARMA(1,1)modelwithmean0.NotethathigherorderNtcanbeincludedintothemodel.Forourcase,let Nt=1)]TJ /F3 11.955 Tf 11.95 0 Td[(B 1)]TJ /F3 11.955 Tf 11.96 0 Td[(Bat(1{5)whichimpliesthat Nt)]TJ /F3 11.955 Tf 11.95 0 Td[(Nt)]TJ /F14 7.97 Tf 6.59 0 Td[(1=at)]TJ /F3 11.955 Tf 11.95 0 Td[(at)]TJ /F14 7.97 Tf 6.58 0 Td[(1.(1{6)ThenthemodelfortimeseriesYthasform 8>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>:Y1=+N1Y2=+N2...YT=+NTYT+1=+!+NT+1...Yn=+!(1)]TJ /F3 11.955 Tf 11.96 0 Td[(n)]TJ /F13 7.97 Tf 6.59 0 Td[(T)=(1)]TJ /F3 11.955 Tf 11.96 0 Td[()+Nn.Inthismodeltherstorderdynamicfunctionisappliedtotheunknownmeanfunction,itmakeshardtoderiveMLEs,sincetheparametersareinvolved"non-linearly"inthemodel. 15

PAGE 16

Undermodel( 1{1 ),wehaveYt=f(t)+Nt=!+f(t)]TJ /F6 11.955 Tf 11.95 0 Td[(1)+Nt=!+Yt)]TJ /F14 7.97 Tf 6.59 0 Td[(1+(Nt)]TJ /F3 11.955 Tf 11.96 0 Td[(Nt)]TJ /F14 7.97 Tf 6.59 0 Td[(1),tT+1Tosimplifythepreviousmodel,weuseanARMA(1,1)timeseries(W1,...,Wn)toreplacetheterms(N1,N2,...,NT;NT+1)]TJ /F3 11.955 Tf 12.15 0 Td[(NT,NT+2)]TJ /F3 11.955 Tf 12.16 0 Td[(NT+1,...,Nn)]TJ /F3 11.955 Tf 12.16 0 Td[(Nn)]TJ /F14 7.97 Tf 6.59 0 Td[(1).Inotherwords,theoriginalinterventionmodel( 1{1 )canbewrittenintheformof( 1{7 )below: 8>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>:Y1=+W1Y2=+W2...YT=+WTYT+1=+!+YT+WT+1...Yn=+!+Yn)]TJ /F14 7.97 Tf 6.59 0 Td[(1+Wn.(1{7)Insteadofapplyingrstorderdynamictothemeanfunction,thenewmodelappliesittotheobservedtimeseries.Themodel( 1{7 )canberewritteninthematrixformas W=AY)]TJ /F3 11.955 Tf 11.96 0 Td[((1{8)where =(,...,,+!,...,+!)T,(1{9) 16

PAGE 17

andthematrixAisgivenby A=2666666666666664100......00010......00...0......)]TJ /F3 11.955 Tf 9.3 0 Td[(1...0...000......)]TJ /F3 11.955 Tf 9.3 0 Td[(13777777777777775(1{10)ThisrepresentationallowsustoderivetheprobabilitydensityfunctionofY.Themodelcanbealsorewrittenintheform W=Y)]TJ /F12 11.955 Tf 11.96 0 Td[(B(1{11) =(,!,)T,(1{12)ThematrixBisgivenby B=2666666666666664100100.........11YT.........11Yn)]TJ /F14 7.97 Tf 6.58 0 Td[(13777777777777775(1{13)Thisformisusefulforderivingestimatesfor,theparametersofinterest.TheprobabilitydensityfunctionofthevectorY=(Y1,...,Yn)equalsto p(Yj,,)=(22))]TJ /F18 5.978 Tf 7.78 3.26 Td[(n 2jZTZj)]TJ /F19 5.978 Tf 7.78 3.26 Td[(1 2expf)]TJ /F6 11.955 Tf 16.47 8.09 Td[(1 2S(,)=2g(1{14) 17

PAGE 18

whereZisgivenby Z=26666666666666641001)]TJ /F3 11.955 Tf 11.95 0 Td[()]TJ /F3 11.955 Tf 9.3 0 Td[(()]TJ /F3 11.955 Tf 11.96 0 Td[()(1)]TJ /F3 11.955 Tf 11.96 0 Td[(2))]TJ /F19 5.978 Tf 7.78 3.26 Td[(1 2()]TJ /F3 11.955 Tf 11.95 0 Td[())]TJ /F3 11.955 Tf 9.3 0 Td[(()]TJ /F3 11.955 Tf 11.96 0 Td[()(1)]TJ /F3 11.955 Tf 11.96 0 Td[(2))]TJ /F19 5.978 Tf 7.78 3.26 Td[(1 2...n)]TJ /F14 7.97 Tf 6.59 0 Td[(1()]TJ /F3 11.955 Tf 11.95 0 Td[())]TJ /F3 11.955 Tf 9.29 0 Td[(n)]TJ /F14 7.97 Tf 6.59 0 Td[(1()]TJ /F3 11.955 Tf 11.95 0 Td[()(1)]TJ /F3 11.955 Tf 11.95 0 Td[(2))]TJ /F19 5.978 Tf 7.78 3.26 Td[(1 23777777777777775(1{15)and S(,)=(AY)]TJ /F3 11.955 Tf 11.95 0 Td[()T\(AY)]TJ /F3 11.955 Tf 11.96 0 Td[()=(Y)]TJ /F12 11.955 Tf 11.95 0 Td[(B)T\(Y)]TJ /F12 11.955 Tf 11.96 0 Td[(B).(1{16)with)]TJ /F1 11.955 Tf 10.67 0 Td[(denedas )-277(=LT(I)]TJ /F12 11.955 Tf 11.95 0 Td[(Z(ZTZ))]TJ /F14 7.97 Tf 6.58 0 Td[(1ZT)L(1{17)AndmatrixLhasform L=2666666666666666664000...00000...00100...00()]TJ /F3 11.955 Tf 11.95 0 Td[()10...00()]TJ /F3 11.955 Tf 11.95 0 Td[()()]TJ /F3 11.955 Tf 11.96 0 Td[()1...00...n)]TJ /F14 7.97 Tf 6.58 0 Td[(2()]TJ /F3 11.955 Tf 11.96 0 Td[()n)]TJ /F14 7.97 Tf 6.58 0 Td[(3()]TJ /F3 11.955 Tf 11.96 0 Td[()n)]TJ /F14 7.97 Tf 6.58 0 Td[(4()]TJ /F3 11.955 Tf 11.96 0 Td[()...()]TJ /F3 11.955 Tf 11.96 0 Td[()13777777777777777775.(1{18)Clearly,theformofmatricesZandLdependsontheorderofthetimeseriesNt.Considerthelikelihoodfunction: L(,,2jY)=(22))]TJ /F18 5.978 Tf 7.78 3.26 Td[(n 2jZTZj)]TJ /F19 5.978 Tf 7.78 3.26 Td[(1 2expf)]TJ /F6 11.955 Tf 16.47 8.09 Td[(1 2S(,)=2g(1{19)First,itcanbeshownthatforanygiven(,),thelikelihoodfunctionismaximizedby^(,)=(BT)]TJ /F12 11.955 Tf 6.77 0 Td[(B))]TJ /F14 7.97 Tf 6.58 0 Td[(1BT)]TJ /F12 11.955 Tf 6.77 0 Td[(Y 18

PAGE 19

and^2(,)=S(,,^)=nwhichdependon(,)through)]TJ /F1 11.955 Tf 6.78 0 Td[(.Pluggedthemintothelikelihoodfunction,weget L(,j^,^2,Y)= 2S(,,^) n!)]TJ /F18 5.978 Tf 7.78 3.26 Td[(n 2jZTZj)]TJ /F19 5.978 Tf 7.78 3.26 Td[(1 2expf)]TJ /F12 11.955 Tf 16.47 8.09 Td[(n 2g.(1{20)Therefore,ifwelet(^,^)bethevaluesthatmaximizetheaboveexpressionL,thentheMLEoftheparameterscanbeobtainedas^,^,^(^,^)and^2(^,^)).Furthermore,wewouldliketopointoutaconnectionbetweentheMLE^(^,^)andaBayesestimator.Ifwelet^=(BT)]TJ /F12 11.955 Tf 6.78 0 Td[(B))]TJ /F14 7.97 Tf 6.59 0 Td[(1BT)]TJ /F12 11.955 Tf 6.78 0 Td[(Ywhichdependon(,)through)]TJ /F1 11.955 Tf 6.77 0 Td[(,thenwehaveS(,,)=[(Y)]TJ /F12 11.955 Tf 11.96 0 Td[(B^))]TJ /F12 11.955 Tf 11.95 0 Td[(B()]TJ /F6 11.955 Tf 13.43 2.66 Td[(^)]T[(Y)]TJ /F12 11.955 Tf 11.95 0 Td[(B^))]TJ /F12 11.955 Tf 11.95 0 Td[(B()]TJ /F6 11.955 Tf 13.43 2.66 Td[(^)]=(Y)]TJ /F12 11.955 Tf 11.96 0 Td[(B^T)\(Y)]TJ /F12 11.955 Tf 11.96 0 Td[(B^)+()]TJ /F6 11.955 Tf 13.42 2.66 Td[(^)TBT)]TJ /F12 11.955 Tf 6.77 0 Td[(B()]TJ /F6 11.955 Tf 13.42 2.66 Td[(^), (1{21)wherethersttermisconstantgiven(,)andY.Therefore,thelikelihoodfunctionand( 1{21 )implythat,conditionedon(,,2),theposteriordistributionofismultivariatenormalwithmean^andcovariance(BT)]TJ /F12 11.955 Tf 6.77 0 Td[(B))]TJ /F14 7.97 Tf 6.59 0 Td[(1.Therefore, L(jY,,,2)/expf)]TJ /F6 11.955 Tf 16.47 8.09 Td[(1 2()]TJ /F6 11.955 Tf 13.43 2.66 Td[(^)TBT)]TJ /F12 11.955 Tf 6.78 0 Td[(B()]TJ /F6 11.955 Tf 13.43 2.66 Td[(^)=2g.(1{22)Inotherwords,theMLE^(^,^)istheBayesestimatorwithauxiliaryparametersestimatedat(^,^). 1.3TheTestProcedureSupposeT=(,T2),where2=(!,),thenforatreatmenteectwewouldliketotest H0:2=(0,0)vsHa:26=(0,0)(1{23) 19

PAGE 20

Hereweconsiderpartitioned.Itiswellknown[ 22 ],thatwhatevertruevalueof ^)]TJ /F3 11.955 Tf 11.96 0 Td[(AN(0,)(1{24)whereisthevariance-covariancematrixofthevector^.LetP=264010001375thenP=264010001375266664!377775=264!375=2Assumethatthematrixisoftheform=266664111213212223313233377775Thenthevariance-covariancematrixforthevector2isgivenby2=Cov(2)=Cov(P)=PPT=26422233233375Tondp)]TJ /F1 11.955 Tf 9.3 0 Td[(valueonecanuseaWaldteststatisticgivenby Tw=^2T)]TJ /F14 7.97 Tf 6.58 0 Td[(12^222(1{25)Weshouldmentionthatthelikelihoodratioteststatisticsandscoreteststatisticscanbeused.Thisresultholdsforlargesamples,butitmaynotbevalidforsmallsamples,becausethechi-squaredapproximationtothenulldistributionfortheteststatisticsmaynotbeasgoodasforlargesamples.Toaddressthisissue,weproposethefollowingproceduretondthep-value: 1. Simulatentimeseriesfromthemodelwith2=(0,0). 20

PAGE 21

2. Estimatecoecients2basedonsimulateddataandcalculateTi,i=1,...,nasaWaldteststatistic. 3. Calculatep)]TJ /F1 11.955 Tf 9.3 0 Td[(valueaccordingtheformulap=Pni=1I(Ti>Tw) n 1.4SimulationStudiesInthissectionwepresentsomenumericalresultstocompareaninterventionmodelwithAR(1)errorsandaninterventionmodelwithARMA(1,1)errors.Thesimulationswereperformedfor=(30,8,0.6)and=(30,0,0).Forthecomparisonpurposewelookedatthetwosetsofdata.TherstsetwassimulatedusingthemodelwithAR(1)errorsandthesecondsetwassimulatedusingthemodelwithARMA(1,1)errors.ThecompuationalexperimentshavebeenperformedwithfreesoftwareenvironmentR[ 23 ].TheresultsofsimulationstudiesaresummarizedinTable 1-1 andTable 1-2 Table1-1. MSEandBiasfor=(30,0.8,0.6) MSEBiasModelFit!! AR(1)0.3952.5780.00040.02460.0767-0.0007AR(1)ARMA(1,1)0.4655.70.0008-0.0795-0.8190.011AR(1)0.4033.190.00050.02540.0944-0.001ARMA(1,1)ARMA(1,1)0.4796.930.001-0.0717-0.89850.011 Table1-2. MSEandBiasfor=(30,0,0) MSEBiasModelFit!! AR(1)0.7325137.90.15180.015-5.070.17AR(1)ARMA(1,1)1.102218.80.240.078-11.220.369AR(1)0.751275.40.3040.0304-8.620.287ARMA(1,1)ARMA(1,1)1.073273.90.3020.103-10.790.353 21

PAGE 22

Figure1-2. EstimatedmeanfunctionsforanARprocess 22

PAGE 23

Figure1-3. EstimatedmeanfunctionsforanARMAprocess 23

PAGE 24

1.5CaseStudyForanillustrativeexampleweconsiderdatafromarandomizedclinicaltrialofConstraintInducedLanguageTherapy(CILT).ThemainaimofthestudywastodetermineifCILTwouldresultinobservableimprovementsinspeechandifitwouldbesignicantlybetterthanregular,unconstrainedlanguagetherapy.Therewerefourgroupsofpatientswhocompletedthestudy: IntensiveCILT(10patients) DistributedCILT(10patients) IntensivePromotingAphasicCommunicativeEectiveness(PACE)(8patients) DistributedPACE(8patients)ThePACEtherapy[ 24 ]wasusedforthecomparisonbecauseofitscommonapplicationintherehabilitationofaphasia.Weexpectthattheclinicalresponseontheinterventionineachgroupcanbevariable,therefore,thesingle-subjectdesignisreasonableapproachtotestforthetreatmenteectforeachpatient.Theresultsfromtrialscanbecombinedusingmeta-analysisorBayesianhierarchicalmodels[ 25 ].Themodel 1{7 andthealgorithmforestimatingp)]TJ /F1 11.955 Tf 9.3 0 Td[(values,describedinSection1.3,wereprogrammedinRandinMATLAB.ThegraphicsofttedmodelfordierentgroupsofpatientsarepresentedinFigure 1-4 ,Figure 1-5 ,Figure 1-6 andFigure 1-7 respectively.TheresultsfromtheCILTstudyaresummarizedinTable 1-3 1.6ConclusionsInthischapter,wedevelopedanimprovedinterventionmodelforsingle-subjectstudieswithrelativelysmallnumberofobservationsforeachsubject.Theexactlikelihoodfunctionforthemodelwasderived.Wealsopresentedaframeworkforatreatmenteecttestinclinicalstudieswithsingle-subjectdesign.Thisgoalisachievedusingthecoecientestimatesfromtheexactlikelihoodfunction. 24

PAGE 25

Table1-3. Casestudyresults Patientp-valueTS! 1<0.00166.0156.1771.310.32520.870.40442.51-12.8450.253<0.0011145.849.2534.820.2140.00148.0160.4117.560.065<0.001927.82920.0218.980.4760.04117.4156.8451.33-0.4870.6891.313.982.750.04780.01423.147.361.140.219<0.001170.4819.5-0.120.69100.00289.5159.06-28.760.62110.2310.1364.1844.66-0.495120.00357.813.150.790.6513<0.001122.0950.071.400.3514<0.00182.9846.5213.610.33150.03519.6456.13-34.160.716<0.00162.9734.10-18.720.72170.0132.583.584.390.5618<0.001104.1537.28-16.70.7619<0.001112.079.4139.590.13200.01528.2969.4-29.980.5221<0.0011551.6310.4123.580.4422<0.001147.1233.1720.570.38230.03119.0334.44-7.680.5624<0.00196.7653.51-20.220.6225<0.00185.472.0141.61-0.0326<0.0011892.407.8349.020.09270.3714.26-2.416.41-0.22280.00161.4217.865.50.16290.02629.913.97-2.750.25300.08910.444.34-0.940.55310.01526.2523.10-17.890.44320.01130.2916.9228.990.19330.35417.8-0.020.79-0.75340.641.510.17-0.0340.37350.02422.2839.6844.85-0.3336<0.0011287.9531.2616.640.38 25

PAGE 26

Figure1-4. IntensiveCILT 26

PAGE 27

Figure1-5. DistributedCILT 27

PAGE 28

Figure1-6. IntensivePACE 28

PAGE 29

Figure1-7. DistributedPACE 29

PAGE 30

ThemodelwassuccessfullyttothedatafromarandomizedclinicaltrialofConstraintInducedLanguageTherapy.Clearly,theapplicationsofsuchmodelsarenotrestrictedtoclinicalstudies,thoughthisresearchwasmotivatedbymedicalapplications. 30

PAGE 31

CHAPTER2ANALYSISOFVARIANCEBASEDONCROSS-FITTINGMEASUREOFSIMILARITYANDPERMUTATIONTEST 2.1IntroductionTheanalysisofexperimentaldatathathavebeenobservedatdierenttimepointsleadstonewstatisticalmodeling.Timeseriesdataariseinmanyscienticelds:economics(stockmarket),medicine(bloodpressuretracedovertime,fMRI),speechrecognition,physicalandenvironmentalsciences.Typicalrealproblemsontimeseriesdealwithmodeling,forecastingandclustering.Forthisreasonthestudyofdistancemeasuresandclusteringfortimeseriesisanimportantpartofresearchinseveralscienticelds.Themaingoalofthisworkistostudygroupdierencesintimeseries.Assumethatineachgrouptimeseriesobservedfrommanydierentsubjects,eachwithdierentmodel.Weshallclaimgroupdierencesifthereismorebetweengroupdierencesthanwithingroupdierences.Thesetypesofproblemsrelyontheabilitytomeasurethesimilarityordissimilaritybetweentimeseries.Deningreasonablemeasureofsimilarityisanontrivialtask.Therearetwomainapproachestoperformpairwisecomparisonbetweentimeseries.Therstapproachdealswithselectedfeaturesextractedfromthedata.Thesecondapproachreliesoncomparisonmodelsbuiltfromtherawdatawithlikelihoodratiotypeoftesting.Inthisworkweintroduceadistancemeasurebasedoncross-tting.Theproposedmeasureshouldbeaconvenienttoolforanalysisofvarianceandtimeseriesclustering. 2.2LiteratureReviewInthissectionwebrieysummarizepreviousresearchonmeasureoftimeseriessimilar-ity/dissimilarity.Wewilldiscussmethodsbasedonrawdataandalsomodelbasedapproachwhichismorerelatedtothegoaloftheresearchinthischapter.Minkowskidistance:LetXandYbeT-dimensionalvectors.ThenMinkowskidistanceinLqnormbetweenobservedvaluesisdenedas:dM=qvuut NXt=1(Xt)]TJ /F12 11.955 Tf 11.95 0 Td[(Yt)q 31

PAGE 32

Thereareseveraldistancesbasedoncross-correlation.Golayetal.[ 26 ]introducedtwocross-correlation-baseddistancesd1cc=(1)]TJ /F12 11.955 Tf 11.95 0 Td[(cc 1+cc)forsome>0,andd2cc=2(1)]TJ /F12 11.955 Tf 11.95 0 Td[(cc)wherecc=PTt=1(Xt)]TJ /F3 11.955 Tf 11.96 0 Td[(X)(Yt)]TJ /F3 11.955 Tf 11.95 0 Td[(Y) SXSY.SXandSYarestandarddeviations.AccordingtoLiao[ 27 ]dissimilarityindexbasedoncross-correlationfunctioncanbedenedas:di,j=s 1)]TJ /F3 11.955 Tf 11.95 0 Td[(2i,j(0) Pmax=12i,j()where2i,j()isthecross-correlationbetweentwotimeseriesXiandYjwithlag,andmaxisthemaximumlag.Sofarweconsideredthemetricsthatarebasedonthesimilarityoftherawdataalignedbytime.Nowwewillfocusonapproachbasedonmodelcomparisonwhenthetimealignmentisirrelevant.Kalpakisetal.[ 28 ]claimthattherearemanysimilarityquerieswhereEuclideandistancebetweenrawdatafailtocapturethenotionofsimilarityandtheyproposedtheEuclideandistancebetweentheLinearPredictiveCoding(LPC)spectraasameasureofdissimilarity.ConsiderAR(p)timeseries,Box[ 21 ]Xt=1Xt)]TJ /F14 7.97 Tf 6.58 0 Td[(1+2Xt)]TJ /F14 7.97 Tf 6.59 0 Td[(2+...+pXt)]TJ /F13 7.97 Tf 6.58 0 Td[(p+atThen,cn=8>>>>>><>>>>>>:1,ifn=1n+Pn)]TJ /F14 7.97 Tf 6.59 0 Td[(1m=1(1)]TJ /F13 7.97 Tf 13.16 4.71 Td[(m n)mcn)]TJ /F13 7.97 Tf 6.59 0 Td[(m,if1
PAGE 33

Alonso[ 29 ]developedtimeseriesclusteringbasedonforecastdensities.LetX(i)=(X(i)1,...,X(i)T)bethetimeseriescorrespondingtotheithsubjectinthesample.Assumef(i)XT+hdenotethedensityfunctionoftheforecastX(i)T+h,thenthedistanceisDij=Zf(i)XT+h)]TJ /F12 11.955 Tf 11.96 0 Td[(f(j)XT+hdxAnotherdistancewasproposedbyPiccolo[ 30 ].ThedistanceisbasedonAR(1)representa-tionofARMAmodels.Wewilldiscussthisdistanceinthenextsectionandcompareitwithproposedcross-ttingdistance.Maharaj[ 31 ]alsousedAR(1)formofARMAmodelstotesthypothesisifthereisdierencebetweenthegeneratingprocessesoftwostationaryseries. 2.3MeasureofDistancebyARMACoecientsThepurposeofthissectionistooutlinetheideaofARdistanceandCross-Fittingmeasureofsimilarity.TheARdistancewasintroducedbyPiccolo[ 30 ].CorduasandPiccolo[ 32 ]discoveredasymptoticdistributionofthesquaredARdistanceinordertosetcomparisonoftimeserieswithinthehypothesestestingframework.LetZtbeazeromeanARIMA(p,d,q)process.AccordingtothestandardnotationofBoxetal.[ 21 ]suchamodelisdenedasfollow: (B)OdZt=(B)at(2{1)whereatisaunivariatewhitenoiseprocesswithzeromeanandconstantvariance2,Bisthebackwardshiftoperator,whichisdenedbyBZt=Zt)]TJ /F14 7.97 Tf 6.59 0 Td[(1.Anautoregressiveoperatoroforderpandamovingaverageoperatorofarderqaredenedas: (B)=1)]TJ /F3 11.955 Tf 11.96 0 Td[(1B)]TJ /F3 11.955 Tf 11.95 0 Td[(2B2)]TJ /F6 11.955 Tf 11.96 0 Td[(...)]TJ /F3 11.955 Tf 11.95 0 Td[(pBp(B)=1)]TJ /F3 11.955 Tf 11.95 0 Td[(1B)]TJ /F3 11.955 Tf 11.95 0 Td[(2B2)]TJ /F6 11.955 Tf 11.96 0 Td[(...)]TJ /F3 11.955 Tf 11.95 0 Td[(qBqwiththeinvertibilityandstationarityrestrictions.WeneedinvertibilityassumptiontoensurethatZtcanberepresentedaccordingtoAR(1)formulation: (B)Zt=at(2{2) 33

PAGE 34

with(B)=(1)]TJ /F12 11.955 Tf 11.95 0 Td[(B)d(B))]TJ /F14 7.97 Tf 6.59 0 Td[(1(B)=1)]TJ /F16 7.97 Tf 16.36 14.94 Td[(1Xj=1jBjand1Xj=1jjj<1BasedonthisrepresentationPiccolo[ 30 ]introducedtheEuclideandistancebetweenthe-weightsasmeasureofdissimilaritybetweentwoARIMAprocessesXtandYt: d=vuut 1Xj=1(xj)]TJ /F3 11.955 Tf 11.95 0 Td[(yj)2,(2{3)wherefxjgandfyjgare-weightsfrommodelsfortimeseriesXtandYtrespectively. 2.4TheCross-FittingMeasureofSimilarityInthissectionwedevelopanewapproachtomeasuresimilaritybetweentimeseries.SupposetherearetwotimeseriesXt,t=1,...,nandYt,t=1,..,m.AssumewecantseriesXtbyARMAmodelM1andseriesYtbyARMAmodelM2.Todenethedistancebetweentwoseriesweusethefollowingalgorithm: 1. ApplyM1totimeseriesXttoobtainpredictionerror211. 2. ApplyM2totimeseriesXttoobtainpredictionerror212. 3. ApplyM1totimeseriesYttoobtainpredictionerror221 4. ApplyM2totimeseriesYttoobtainpredictionerror222 5. Denethedistancebetweenthetwotimeseriesby: d(1,2)=212)]TJ /F3 11.955 Tf 11.95 0 Td[(211 211+221)]TJ /F3 11.955 Tf 11.96 0 Td[(222 222(2{4)Inthecasewhenweareonlyinterestedinthe`shape`dierenceofthetwotimeserieswecanstandardizetheseriesbyXt=Xt)]TJ /F6 11.955 Tf 13.64 2.66 Td[(X Sx,Yt=Yt)]TJ /F6 11.955 Tf 15 2.66 Td[(Yt Sy, 34

PAGE 35

whereX,Y,Sx,Syarethestandardnotationforsamplemeansandstandarddeviationsrespectively.Theproposedmeasuresatisespropertiesofasemimetric: 1. d(Xt,Yt)0 2. d(Xt,Yt)=0ifandonlyifXt=Yt 3. d(Xt,Yt)=d(Yt,Xt)ConsidertwoAR(1)models: Xt=1Xt)]TJ /F14 7.97 Tf 6.59 0 Td[(1+twheretareiidN(0,1) Yt=2Yt)]TJ /F14 7.97 Tf 6.59 0 Td[(1+t,wheretareiidN(0,1)Intermsofthemodelscoecientsthecross-ttingdistanceisequal:d(1,2)=(1)]TJ /F3 11.955 Tf 11.96 0 Td[(2)2 1)]TJ /F3 11.955 Tf 11.95 0 Td[(21+(1)]TJ /F3 11.955 Tf 11.96 0 Td[(2)2 1)]TJ /F3 11.955 Tf 11.96 0 Td[(22ConsiderthreetimeseriesfromAR(1)models: 1. Xt=0.1Xt)]TJ /F14 7.97 Tf 6.59 0 Td[(1+t,t=1,...,100 2. Yt=0.5Yt)]TJ /F14 7.97 Tf 6.59 0 Td[(1+t,t=1,...,100 3. Zt=0.9Zt)]TJ /F14 7.97 Tf 6.59 0 Td[(1+t,t=1,...,100Forthecross-ttingmeasureweobtain:accordingtoourdenitiond(1,2)=0.37,d(2,3)=1.055FortheARdistanceitiseasytoseethatthePiccolo'sEuclideandistancebetweenmodel1(=0.1)andmodel2(=0.5)isthesameasdistancebetweenmodel2(=0.5)andmodel3(=0.9).BasedongraphicalrepresentationweexpectmoredissimilaritybetweenModel2andModel3.WeconsideredthreestationarytimeseriesforcomparisonbetweenPiccolo'sdistanceandcross-ttingmeasureofsimilarity.Thedierenceisevenmoreillustrativeifweconsidertwostationarytimeseriesandonenon-stationary,becausethedissimilarityisgoingtobeevenmore 35

PAGE 36

extremebetweennon-stationaryandstationarytimeseriesthanbetweentwostationaryseries.SupposetherearetwotimeseriesfromAR(2)models: Xt=1Xt)]TJ /F14 7.97 Tf 6.59 0 Td[(1+2Xt)]TJ /F14 7.97 Tf 6.58 0 Td[(2+t, Yt=1Yt)]TJ /F14 7.97 Tf 6.59 0 Td[(1+2Yt)]TJ /F14 7.97 Tf 6.58 0 Td[(2+tBasedonthedenitionofcross-ttingmeasure:d(1,2)=212)]TJ /F3 11.955 Tf 11.95 0 Td[(211 211+221)]TJ /F3 11.955 Tf 11.95 0 Td[(222 222Then211=E(Xt)]TJ /F6 11.955 Tf 13.65 2.66 Td[(^Xt)2=E(2t)=1andsimilarly222=1.For212wetdatafromthetimeseriesbasedontherstmodelusingthesecondmodel:212=(0))]TJ /F6 11.955 Tf 11.96 0 Td[(2(1(1)+2(2))+(21+22)(0)+212(1)221=(0))]TJ /F6 11.955 Tf 11.95 0 Td[(2(1(1)+2(2))+(21+22)(0)+212(1)Where:(0)=1)]TJ /F3 11.955 Tf 11.96 0 Td[(2 1)]TJ /F3 11.955 Tf 11.95 0 Td[(2)]TJ /F3 11.955 Tf 11.96 0 Td[(21)]TJ /F3 11.955 Tf 11.96 0 Td[(212)]TJ /F3 11.955 Tf 11.96 0 Td[(22+32(1)=1 1)]TJ /F3 11.955 Tf 11.95 0 Td[(2)]TJ /F3 11.955 Tf 11.96 0 Td[(21)]TJ /F3 11.955 Tf 11.96 0 Td[(212)]TJ /F3 11.955 Tf 11.96 0 Td[(22+32(2)=21)]TJ /F3 11.955 Tf 11.95 0 Td[(2(1)]TJ /F3 11.955 Tf 11.95 0 Td[(2) 1)]TJ /F3 11.955 Tf 11.95 0 Td[(2)]TJ /F3 11.955 Tf 11.96 0 Td[(21)]TJ /F3 11.955 Tf 11.96 0 Td[(212)]TJ /F3 11.955 Tf 11.96 0 Td[(22+32and(0)=1)]TJ /F3 11.955 Tf 11.95 0 Td[(2 1)]TJ /F3 11.955 Tf 11.95 0 Td[(2)]TJ /F3 11.955 Tf 11.95 0 Td[(21)]TJ /F3 11.955 Tf 11.96 0 Td[(212)]TJ /F3 11.955 Tf 11.95 0 Td[(22+32(1)=1 1)]TJ /F3 11.955 Tf 11.95 0 Td[(2)]TJ /F3 11.955 Tf 11.95 0 Td[(21)]TJ /F3 11.955 Tf 11.96 0 Td[(212)]TJ /F3 11.955 Tf 11.95 0 Td[(22+32(2)=21)]TJ /F3 11.955 Tf 11.96 0 Td[(2(1)]TJ /F3 11.955 Tf 11.96 0 Td[(2) 1)]TJ /F3 11.955 Tf 11.95 0 Td[(2)]TJ /F3 11.955 Tf 11.95 0 Td[(21)]TJ /F3 11.955 Tf 11.96 0 Td[(212)]TJ /F3 11.955 Tf 11.95 0 Td[(22+32 36

PAGE 37

Figure2-1. ComparisonofthreestationaryAR(1)timeseries 37

PAGE 38

2.5ANOVABasedonCross-FittingMeasureofSimilarityandPermutationTestInthissectionweconsidertheFisher'spermutationtest[ 33 ]fortheANOVAwiththecross-ttingdistancederivedintheprevioussection.Thepermutationtestallowstoestimateap)]TJ /F1 11.955 Tf 9.3 0 Td[(valuewithoutanyassumptionsaboutthedistributionofateststatisticsunderthenullhypothesis.Letgroupi,i=1,...,KhaveobservationsYij(t),wherejisthesubjectindexandtisthetimeindex,j=1,...,ni.AssumethetimeseriesmodelfortimeseriesijisMij.Letthettingdistancebetweenijandklbed(ij,kl).TheteststatisticforH0thatthereisnogroupdierenceis T=averagebetweengroupmeasure(BM) averagewithingroupmeasure(WM)(2{5)whereBMisgivenby BM=PAllbetweengroupmeasures PK)]TJ /F14 7.97 Tf 6.58 0 Td[(1i=1niPKj=i+1nj(2{6)and WM=PAllwithingroupmeasures PKj=1Pnj)]TJ /F14 7.97 Tf 6.59 0 Td[(1i=1(nj)]TJ /F12 11.955 Tf 11.96 0 Td[(i)(2{7)Toestimatep)]TJ /F1 11.955 Tf 9.3 0 Td[(valueforthetestonecanusethepermutationtest.Thepermutationalgorithmisasfollow: 1. CalculatestatisticsTusingtheequation 2{5 2. EvaluatevalueTiforeachpermutation,i=1,...,N 3. Approximatep)]TJ /F1 11.955 Tf 9.29 0 Td[(valueasfollow^p=PNi=1I(Ti>T) N 2.6ConclusionsInthischapterwepresentedacross-ttingmeasure,anovelapproachtomeasuresimilaritybetweentimeseries.Wealsodiscussedsomelimitationsofpreviousresearch.WederivedANOVAbasedoncross-ttingmeasureofsimilarityandpermutationtest.Theproposedmeasurecanbeausefultoolforproblemsthatinvolvetimeseriesclustering. 38

PAGE 39

APPENDIXALIKELIHOODFUNCTIONInthispart,usingresultsfromNewbold[ 34 ]foranARMA(1,1)process,W=(W1,...,Wn),wederivetheexactlikelihoodfunctionforavectorY=(Y1,...,Yn).Considerthemodel: 8>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>:Y1=+W1...YT=+WTYT+1=+!+YT+WT+1...Yn=+!+Yn)]TJ /F14 7.97 Tf 6.59 0 Td[(1+Wn(A{1)WeassumethatWt,t=1,...,nfollowARMA(1,1)model.Let 8>>>>>><>>>>>>:a0=a0W0=W0at=Wt)]TJ /F3 11.955 Tf 11.96 0 Td[(Wt)]TJ /F14 7.97 Tf 6.59 0 Td[(1)]TJ /F3 11.955 Tf 11.96 0 Td[(at)]TJ /F14 7.97 Tf 6.59 0 Td[(1,(1tn)(A{2)Denevectoreasfollow e=(e,en)T(A{3)wheree=(a0,W0)Tanden=(a1,...,an)TThenthesetofequations( A{2 )canbewrittenasfollow e=LW+Xe(A{4) 39

PAGE 40

whereL=2666666666666666664000...00000...00100...00()]TJ /F3 11.955 Tf 11.95 0 Td[()10...00()]TJ /F3 11.955 Tf 11.95 0 Td[()()]TJ /F3 11.955 Tf 11.96 0 Td[()1...00...n)]TJ /F14 7.97 Tf 6.59 0 Td[(2()]TJ /F3 11.955 Tf 11.96 0 Td[()n)]TJ /F14 7.97 Tf 6.58 0 Td[(3()]TJ /F3 11.955 Tf 11.96 0 Td[()n)]TJ /F14 7.97 Tf 6.58 0 Td[(4()]TJ /F3 11.955 Tf 11.96 0 Td[()...()]TJ /F3 11.955 Tf 11.96 0 Td[()13777777777777777775andX=26666666666666641001)]TJ /F3 11.955 Tf 9.3 0 Td[(2)]TJ /F3 11.955 Tf 9.3 0 Td[(......n)]TJ /F3 11.955 Tf 9.3 0 Td[(n)]TJ /F14 7.97 Tf 6.59 0 Td[(13777777777777775Thenthemodel( A{4 )canbewrittenas 0B@een1CA=0B@0Ln1CAW+0B@IXn1CAe(A{5)Consider E(eeT)=E264a20aoW0a0W0W20375(A{6)ThestationaryandinvertibleARMA(p,q)processcanberepresentedasWt= (B)at=1Xj=0 jat)]TJ /F13 7.97 Tf 6.59 0 Td[(jwhere (B)=)]TJ /F14 7.97 Tf 6.58 0 Td[(1(B)(B) 40

PAGE 41

Letjisanautocovariancefunction,thenj=E(WtWt)]TJ /F13 7.97 Tf 6.58 0 Td[(j)Thesetofequationsforautocovariancefunctionsisgivenby[ 21 ] 8>>>>>><>>>>>>:0=1+2(1)]TJ /F3 11.955 Tf 11.95 0 Td[( 1)1=0)]TJ /F3 11.955 Tf 11.96 0 Td[(2k=k)]TJ /F14 7.97 Tf 6.58 0 Td[(1(k2)(A{7)Solving( A{7 )for0and1weobtain 8>>>>>><>>>>>>:0=1+2)]TJ /F14 7.97 Tf 6.58 0 Td[(2 1)]TJ /F15 7.97 Tf 6.59 0 Td[(221=(1)]TJ /F15 7.97 Tf 6.59 0 Td[()()]TJ /F15 7.97 Tf 6.58 0 Td[() 1)]TJ /F15 7.97 Tf 6.59 0 Td[(22k=k)]TJ /F14 7.97 Tf 6.58 0 Td[(1(k2)(A{8)Clearly,E(a20)=2,andE(W20)=0=1+2)]TJ /F6 11.955 Tf 11.96 0 Td[(2 1)]TJ /F3 11.955 Tf 11.96 0 Td[(22Forh0,Cov(at+h)]TJ /F13 7.97 Tf 6.59 0 Td[(j,Wt)=Cov(at+h)]TJ /F13 7.97 Tf 6.58 0 Td[(j,1Xk=0 kat)]TJ /F13 7.97 Tf 6.59 0 Td[(k)= j)]TJ /F13 7.97 Tf 6.59 0 Td[(h2Therefore,E(a0W0)= 02=2Then E(eeT)=2(A{9)where=2641111+2)]TJ /F14 7.97 Tf 6.58 0 Td[(2 1)]TJ /F15 7.97 Tf 6.58 0 Td[(2375 41

PAGE 42

LetTbeanonsingularmatrixs.t.TTT=IMultiplicationof( A{5 )bythematrix264T00I375yields 0B@uun1CA=0B@0Ln1CAW+0B@IXnT)]TJ /F14 7.97 Tf 6.59 0 Td[(11CAu(A{10)whereu=Teandun=en.Inmatrixnotationwecanwrite: u=LW+Zu(A{11)Zisgivenby Z=26666666666666641001)]TJ /F3 11.955 Tf 11.96 0 Td[()]TJ /F3 11.955 Tf 9.3 0 Td[(()]TJ /F3 11.955 Tf 11.95 0 Td[()()]TJ /F3 11.955 Tf 11.96 0 Td[())]TJ /F3 11.955 Tf 9.3 0 Td[(()]TJ /F3 11.955 Tf 11.95 0 Td[()...n)]TJ /F14 7.97 Tf 6.58 0 Td[(1()]TJ /F3 11.955 Tf 11.96 0 Td[())]TJ /F3 11.955 Tf 9.3 0 Td[(n)]TJ /F14 7.97 Tf 6.58 0 Td[(1()]TJ /F3 11.955 Tf 11.96 0 Td[()3777777777777775(A{12)SinceE(uuT)=2TTTthenthedensityfunctionofuisgivenbyf(uj)=(22))]TJ /F19 5.978 Tf 7.78 3.26 Td[(1 2(n+2)exp)]TJ /F6 11.955 Tf 10.49 8.08 Td[(1 2uTu=2Therefore,thejointdensityfunctionofWanduisgivenbyf(W,u)=(22))]TJ /F19 5.978 Tf 7.78 3.26 Td[(1 2(n+2)exp)]TJ /F6 11.955 Tf 10.49 8.09 Td[(1 2S(,,u)=2 42

PAGE 43

withS(,,u)isgivenbyS(,,u)=(LW+Zu)T(LW+Zu)Let^u=)]TJ /F6 11.955 Tf 9.3 0 Td[((ZTZ))]TJ /F14 7.97 Tf 6.59 0 Td[(1ZTLWnusingthefactthatS(,,u)=S(,)+(u)]TJ /F6 11.955 Tf 12.2 0 Td[(^u)TZTZ(u)]TJ /F6 11.955 Tf 12.19 0 Td[(^u)whereS(,)=(LW+Z^u)T(LW+Z^u)thejointdensityfunctioncanbewrittenasf(W,u)=f(Wj,,)f(ujW,,,)therefore,themarginaldensityfunctionisgivenby f(Wj,,)=(22))]TJ /F18 5.978 Tf 7.78 3.26 Td[(n 2jZTZj)]TJ /F19 5.978 Tf 7.79 3.26 Td[(1 2expf)]TJ /F6 11.955 Tf 16.47 8.09 Td[(1 2S(,)=2g(A{13)Onecanrewrite S(,)=(LW)]TJ /F12 11.955 Tf 11.95 0 Td[(Z(ZTZ))]TJ /F14 7.97 Tf 6.59 0 Td[(1ZTLW)T(LW)]TJ /F12 11.955 Tf 11.96 0 Td[(Z(ZTZ))]TJ /F14 7.97 Tf 6.59 0 Td[(1ZTLW)=WT)]TJ /F12 11.955 Tf 6.77 0 Td[(W(A{14)where)-277(=LT(I)]TJ /F12 11.955 Tf 11.96 0 Td[(Z(ZTZ))]TJ /F14 7.97 Tf 6.59 0 Td[(1ZT)TLConsidermodel( A{1 ).Inmatrixformitcanberewrittenas W=AY)]TJ /F3 11.955 Tf 11.95 0 Td[(!(A{15) 43

PAGE 44

where A=2666666666666664100......00010......00...0......)]TJ /F3 11.955 Tf 9.3 0 Td[(1...0...000......)]TJ /F3 11.955 Tf 9.3 0 Td[(13777777777777775(A{16)then A)]TJ /F14 7.97 Tf 6.59 0 Td[(1=2666666666666664100......00010......00...0......1...0...000......13777777777777775(A{17)AndtheJacobianofthetransformationisj(det(A)]TJ /F14 7.97 Tf 6.58 0 Td[(1)))]TJ /F14 7.97 Tf 6.58 0 Td[(1j=1.Thus,theexactlikelihoodforthevectorY=(Y1,...,Yn)isoftheform p(Yj,,)=(22))]TJ /F18 5.978 Tf 7.78 3.26 Td[(n 2jZTZj)]TJ /F19 5.978 Tf 7.78 3.26 Td[(1 2expf)]TJ /F6 11.955 Tf 16.47 8.09 Td[(1 2S(,)=2g(A{18)whereS(,)=(AY)]TJ /F3 11.955 Tf 11.95 0 Td[(!)T\(AY)]TJ /F3 11.955 Tf 11.96 0 Td[(!)andZTZ=2641+()]TJ /F15 7.97 Tf 6.59 0 Td[()2(1)]TJ /F15 7.97 Tf 6.59 0 Td[(2n) 1)]TJ /F15 7.97 Tf 6.59 0 Td[(2)]TJ /F6 11.955 Tf 9.3 0 Td[(()]TJ /F3 11.955 Tf 11.96 0 Td[()21)]TJ /F15 7.97 Tf 6.58 0 Td[(2n 1)]TJ /F15 7.97 Tf 6.59 0 Td[(2)]TJ /F6 11.955 Tf 9.29 0 Td[(()]TJ /F3 11.955 Tf 11.96 0 Td[()21)]TJ /F15 7.97 Tf 6.59 0 Td[(2n 1)]TJ /F15 7.97 Tf 6.59 0 Td[(21+()]TJ /F3 11.955 Tf 11.96 0 Td[()2221)]TJ /F15 7.97 Tf 6.59 0 Td[(2n 1)]TJ /F15 7.97 Tf 6.59 0 Td[(2375Therefore,thedeterminantisgivenbyjZTZj=1+()]TJ /F3 11.955 Tf 11.95 0 Td[()21)]TJ /F3 11.955 Tf 11.96 0 Td[(2n (1)]TJ /F3 11.955 Tf 11.96 0 Td[(2)(1)]TJ /F3 11.955 Tf 11.95 0 Td[(2) 44

PAGE 45

APPENDIXBCROSS-FITTINGDISTANCEConsidertwotimeseriesfromAR(2)models: Xt=1Xt)]TJ /F14 7.97 Tf 6.59 0 Td[(1+2Xt)]TJ /F14 7.97 Tf 6.58 0 Td[(2+t Yt=1Yt)]TJ /F14 7.97 Tf 6.59 0 Td[(1+2Yt)]TJ /F14 7.97 Tf 6.58 0 Td[(2+tThen211=E(Xt)]TJ /F6 11.955 Tf 13.64 2.66 Td[(^Xt)2=E(2t)=1For212wetdatafromthemodel(1)usingthemodel(2)212=E(Xt)]TJ /F6 11.955 Tf 10.99 2.65 Td[(^Xt)2=E(Xt)]TJ /F3 11.955 Tf 9.3 0 Td[(1Xt)]TJ /F14 7.97 Tf 6.59 0 Td[(1)]TJ /F3 11.955 Tf 9.3 0 Td[(2Xt)]TJ /F14 7.97 Tf 6.59 0 Td[(2)2=E(X2t))]TJ /F6 11.955 Tf 9.3 0 Td[(2E(Xt(1Xt)]TJ /F14 7.97 Tf 6.58 0 Td[(1)]TJ /F3 11.955 Tf 9.29 0 Td[(2Xt)]TJ /F14 7.97 Tf 6.58 0 Td[(2))+E(1Xt)]TJ /F14 7.97 Tf 6.59 0 Td[(1)]TJ /F3 11.955 Tf 9.3 0 Td[(2Xt)]TJ /F14 7.97 Tf 6.59 0 Td[(2)2Tondcov(Xt+h,Xt)onecanusedierenceequations(h))]TJ /F3 11.955 Tf 11.96 0 Td[(1(h)]TJ /F6 11.955 Tf 11.95 0 Td[(1))]TJ /F3 11.955 Tf 11.95 0 Td[(2(h)]TJ /F6 11.955 Tf 11.96 0 Td[(2)=0,h>max(p,q+1)withinitialconditions(h))]TJ /F3 11.955 Tf 11.95 0 Td[(1(h)]TJ /F6 11.955 Tf 11.96 0 Td[(1))]TJ /F3 11.955 Tf 11.96 0 Td[(2(h)]TJ /F6 11.955 Tf 11.95 0 Td[(2)=2qXj=hj j)]TJ /F13 7.97 Tf 6.59 0 Td[(hwherejarecoecientsfromMApart:0=1,j=0forj1Tond jonecanusetheequation:( 0+ 1x+ 2x2...)(1)]TJ /F3 11.955 Tf 11.95 0 Td[(1x)]TJ /F3 11.955 Tf 11.96 0 Td[(2x2)]TJ /F6 11.955 Tf 11.96 0 Td[(...)=(1+1x+2x2+...)Therstfewvalues: 0=1 1)]TJ /F3 11.955 Tf 11.96 0 Td[(1 0=1 2)]TJ /F3 11.955 Tf 11.95 0 Td[(1 1)]TJ /F3 11.955 Tf 11.96 0 Td[(2 0=2 45

PAGE 46

Andfromthesystemofequationsweget: 0=1 1=1 2=21+2Thus(0),(1),(2)canbeobtainedfromthesystemofequations:1(1)+2(2)+1=(0)1(0)+2(1)=(1)1(1)+2(0)=(2)E(X2t)=(0)=1)]TJ /F3 11.955 Tf 11.96 0 Td[(2 1)]TJ /F3 11.955 Tf 11.95 0 Td[(2)]TJ /F3 11.955 Tf 11.95 0 Td[(21)]TJ /F3 11.955 Tf 11.96 0 Td[(212)]TJ /F3 11.955 Tf 11.96 0 Td[(22+32E(XtXt)]TJ /F14 7.97 Tf 6.59 0 Td[(1)=(1)=1 1)]TJ /F3 11.955 Tf 11.95 0 Td[(2)]TJ /F3 11.955 Tf 11.95 0 Td[(21)]TJ /F3 11.955 Tf 11.96 0 Td[(212)]TJ /F3 11.955 Tf 11.96 0 Td[(22+32E(XtXt)]TJ /F14 7.97 Tf 6.59 0 Td[(2)=(2)=21)]TJ /F3 11.955 Tf 11.95 0 Td[(2(1)]TJ /F3 11.955 Tf 11.95 0 Td[(2) 1)]TJ /F3 11.955 Tf 11.95 0 Td[(2)]TJ /F3 11.955 Tf 11.95 0 Td[(21)]TJ /F3 11.955 Tf 11.96 0 Td[(212)]TJ /F3 11.955 Tf 11.96 0 Td[(22+32Andnally,212=(0))]TJ /F6 11.955 Tf 11.96 0 Td[(2(1(1)+2(2))+(21+22)(0)+212(1)221=(0))]TJ /F6 11.955 Tf 11.95 0 Td[(2(1(1)+2(2))+(21+22)(0)+212(1) 46

PAGE 47

APPENDIXCRCODEFOREVALUATINGMLEInthischapterwedevelopedRcodeforcalculatingexactlikelihoodfunctionandMLEforimprovedmodel>rm(list=ls())>ciu<-read.table("CIUdata.txt")>ciu<-as.matrix(ciu)>p.val<-function(TS){Y<-TSar.fit<-function(Y){phi<-seq(-0.99,0.99,0.01)n<-length(Y)tcp<-4Zm<-function(x,y,n){Zn<-matrix(rep(0,2*n),nrow=n)a<-c(0:(n-1))Zn[,1]<-(x^a)*(x-y)Zn[,2]<-(-y)*x^a*(x-y)*(1-y^2)^(-0.5)Z<-rbind(diag(1,2,2),Zn)return(Z)}Lm<-function(x,y=0,n){Ln<-matrix(rep(0,n*n),nrow=n)b<-c(0:(n-2))for(iin1:(n-1)){Ln[,1]<-c(1,(x^b)*(x-y))Ln[(i+1):n,i+1]<-Ln[1:(n-i),1] 47

PAGE 48

}L<-rbind(rep(0,n),rep(0,n),Ln)return(L)}Determ<-function(x,y,n){D<-1+(x-y)^2*(1-x^(2*n))/((1-x^2)*(1-y^2))}InvM<-function(x,y,n){Inv11<-1+(x-y)^2*y^2*(1-x^(2*n))/((1-y^2)*(1-x^2))Inv22<-1+(x-y)^2*(1-x^(2*n))/(1-x^2)Inv12<-(x-y)^2*y*(1-x^(2*n))/((1-y^2)^(1/2)*(1-x^2))Inv<-Determ(x,y,n)^(-1)*matrix(c(Inv11,Inv12,Inv12,Inv22),ncol=2)}likl<-function(x){phi<-xI<-diag(1,n+2,n+2)Z<-Zm(0,phi,n)L<-Lm(0,phi,n)Det<-Determ(0,phi,n)Inv<-InvM(0,phi,n)B<-cbind(rep(1,n),c(rep(0,4),rep(1,9)),c(rep(0,tcp),Y[tcp:12]))Gamma<-t(L)%*%(I-Z%*%Inv%*%t(Z))%*%L 48

PAGE 49

betaHat<-solve(t(B)%*%Gamma%*%B)%*%t(B)%*%Gamma%*%YS<-t(Y-B%*%betaHat)%*%Gamma%*%(Y-B%*%betaHat)lgl<--n/2*log(S)-1/2*log(Det)return(lgl)}Lik<-rep(0,length(phi))Lik<-sapply(phi,likl)phi<-phi[which.max(Lik)]I<-diag(1,n+2,n+2)Z<-Zm(0,phi,n)L<-Lm(0,phi,n)Det<-Determ(0,phi,n)Inv<-InvM(0,phi,n)B<-cbind(rep(1,n),c(rep(0,4),rep(1,9)),c(rep(0,4),Y[4:12]))Gamma<-t(L)%*%(I-Z%*%Inv%*%t(Z))%*%Ltemp<-solve(t(B)%*%Gamma%*%B)betaHat<-temp%*%t(B)%*%Gamma%*%YS<-t(Y-B%*%betaHat)%*%Gamma%*%(Y-B%*%betaHat)s2<-sqrt(S/n)s2<-as.numeric(s2)tmp2<-temp*s2^2lik<-c(phi,betaHat,s2)CovInv<-solve(temp[2:3,2:3])TStat<-betaHat[2:3]%*%CovInv%*%betaHat[2:3]/s2^2 49

PAGE 50

lik<-c(TStat,phi,betaHat,s2)return(lik)}coeff<-as.numeric(ar.fit(TS))n.col<-100n.row<-13s.data<-matrix(rep(0,n.col*n.row),nrow=n.row)for(iin1:n.col){s.data[,i]<-arima.sim(list(order=c(1,0,0),ar=coeff[2]),n=n.row)*coeff[6]}sim.coef<-apply(s.data,2,ar.fit)p<-sum(coeff[1]
PAGE 51

APPENDIXDMATLABCODEFOREVALUATINGMLETheMATLABcodewaswrittenbyDr.SamWuandOleksandrSavenkov. %FitDataDisplayFitOnly%DisplayFitAndData%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%functionFitDataY=InputData;T=4;n=13;Times=1:13;llRes=[];[ParEst,CovOmegaDelta,TestStat,Pvalues]=FitSSdata(Y,T);[StdC,Pvalue]=EvalCstat(Y);AllRes=[ParEst,reshape(CovOmegaDelta,1,4),TestStat,Pvalues,StdC,Pvalue];ParEstfid2=fopen('AnalysisResults_Tmp.txt','w');[r,c]=size(AllRes);forii=1:rforjj=1:cfprintf(fid2,['%9.4f'],AllRes(ii,jj));endfprintf(fid2,'\n');endfclose(fid2); 51

PAGE 52

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%functionDisplayFitOnlyT=4;n=13;Times=1:13;BetaHat=[31.92-13.150.36];BetaHat=[29.4218.95-0.60];BetaHat=[30.420.0010.005];Mu=BetaHat(1);Omega=BetaHat(2);Delta=BetaHat(3);Yhat=zeros(n,1);Yhat(1:T)=Mu;fort=(T+1):nYhat(t)=Mu+Omega+Delta*Yhat(t-1);endfigure(3)plot(Times,Yhat,'b-','MarkerSize',4,'LineWidth',1);ylim([0,100]);set(gca,'ytick',[0255075100]);set(gca,'yticklabel',['0';'25';'50';'75';'100']);ylabel('Percent');set(gca,'xtick',[4812]);xlabel('Sessions')%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%functionDisplayFitAndData 52

PAGE 53

Y=InputData;T=4;n=13;Times=1:13;loadAnalysisResults_Tmp.txt;Est=AnalysisResults_Tmp;BetaHat=Est(4:6);Mu=BetaHat(1);Omega=BetaHat(2);Delta=BetaHat(3);Yhat=zeros(n,1);Yhat(1:T)=Mu;fort=(T+1):nYhat(t)=Mu+Omega+Delta*Yhat(t-1);endfigure(3)plot(Times,Y,'b^',Times,Yhat,'b-','MarkerSize',4,'LineWidth',1);ylim([0,100]);p1=Est(13);p1=round(p1*1e4)/1e4;p2=Est(15);p2=round(p2*1e4)/1e4;title(strcat('p=',num2str(p1,4),'&',num2str(p2,4)));set(gca,'ytick',[0255075100]);set(gca,'yticklabel',['0';'25';'50';'75';'100']);ylabel('Percent');set(gca,'xtick',[4812]); 53

PAGE 54

xlabel('Sessions')%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function[ParEst,CovOmegaDelta,TestStat,Pvalues]=FitSSdata(Y,T)%%Y--singlesubjectobservationseries%%T--timeofintervention%%n=length(Y);B=[ones(n,1)[zeros(T,1);ones(n-T,1)][zeros(T,1);Y(T:(n-1))]];[ParEst,Cov_Beta]=GridSearch(B,Y);CovOmegaDelta=Cov_Beta(2:3,2:3);TestStat=ParEst(5:6)*inv(CovOmegaDelta)*ParEst(5:6)';Pvalue1=1-chi2cdf(TestStat,2);Pvalue2=0;%%EvalPvalue2(ParEst,TestStat,T,n);Pvalues=[Pvalue1,Pvalue2];functionPvalue2=EvalPvalue2(ParEst0,TestStat0,T,n)Rep=4e3;Fi=ParEst0(1);Theta=ParEst0(2);s=sqrt(ParEst0(3));Mu=ParEst0(4);Pvalue2=0;fori=1:RepNoise=simarma(Fi,-Theta,n,s^2); 54

PAGE 55

Y=Mu+Noise';B=[ones(n,1)[zeros(T,1);ones(n-T,1)][zeros(T,1);Y(T:(n-1))]];[ParEst,Cov_Beta]=GridSearch(B,Y);CovOmegaDelta=Cov_Beta(2:3,2:3);TestStat=ParEst(5:6)*inv(CovOmegaDelta)*ParEst(5:6)';Pvalue2=Pvalue2+(TestStat>TestStat0)/Rep;end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ThisnewversionwascreatedonOct17,2011%%function[ParEst,Cov_Beta]=GridSearch(B,Y);tmp=[];n=length(Y);forFi=-0.99:0.01:0.99forTheta=0%%-.99:0.01:0.99%%s2=mean(Residuals.^2)*(1-Fi^2)/(1+Theta^2-2*Theta*Fi);[Z,L,DetZpZ,Gamma]=CreateZLGamma(Fi,Theta,n);BetaHat=inv(B'*Gamma*B)*B'*Gamma*Y;Residuals=(Y-B*BetaHat);s2=Residuals'*Gamma*Residuals/n;ll=-n/2*log(2*pi*s2)-log(DetZpZ)/2-n/2;%%ll=-n/2*log(2*pi*s2);tmp=[tmp;[FiThetas2BetaHat'll]]; 55

PAGE 56

endenda=sortrows(tmp,-7);ParEst=a(1,1:6);[Z,L,DetZpZ,Gamma]=CreateZLGamma(ParEst(1),ParEst(2),n);Tmp=inv(B'*Gamma*B);BetaHat=Tmp*B'*Gamma*Y;Residuals=(Y-B*BetaHat);s2=Residuals'*Gamma*Residuals/n;Cov_Beta=Tmp*s2;function[Z,L,DetZpZ,Gamma]=CreateZLGamma(fi,theta,n)a=(0:(n-1))';b=(theta.^a)*(theta-fi);Z=[[1;0;b][0;1;b*(-fi)*((1-fi^2)^(-0.5))]];tmp=[0;1;b];L=[];fori=1:ntmp=[0;tmp(1:(n+1))];L=[Ltmp];endw=(theta-fi)^2*(1-theta^(2*n))/(1-theta^2); 56

PAGE 57

r=1/sqrt(1-fi^2);DetZpZ=1+w/(1-fi^2);InvZpZ=[1+w*fi^2*r^2,w*fi*r;w*fi*r,1+w]/DetZpZ;Gamma=L'*(eye(n+2)-Z*InvZpZ*Z')*L;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%functiony=simarma(fi,theta,n,s2,seed)%y=simarma(fi,theta,n,s2)simulatesARMAprocess,%fivectorfiparamaters,thetavectorofthetaparameters%nobservations%s2WNvariance%iffifthargumentseedgiven,seedistherandomgeneratorseed%%TheparametrizationisundertheBrockwellnotationsforthetaandfi!!!!!!ifnargin==5randn('seed',seed);endy=filter([1theta],[1-fi],randn(1,n+20));y=y(21:n+20)*sqrt(s2);function[StdC,Pvalue]=EvalCstat(x)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ThisprogramevaluatetheCstatisticsbyTryon,1982%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 57

PAGE 58

n=length(x);a=x(2:n)-x(1:(n-1));b=x-mean(x);sc=sqrt((n-2)/(n-1)/(n+1));c=1-sum(a.^2)/2/sum(b.^2);StdC=c/sc;Pvalue=2*(1-normcdf(StdC)); 58

PAGE 59

REFERENCES [1] RobeyR,SchultzM,CrawfordA,SinnerC.Review:Single-subjectclinical-outcomeresearch:designs,data,eectsizes,andanalyses.Aphasiology1999;13(6):445{473. [2] OttenbacherK.Interrateragreementofvisualanalysisinsingle-subjectdecisions:Quanti-tativereviewandanalysis.Americanjournalonmentalretardation1993;. [3] KazdinA.Single-caseresearchdesigns:Methodsforclinicalandappliedsettings.OxfordUniversityPressNewYork,1982. [4] BloomM,FischerJ,OrmeJ,etal..Evaluatingpractice.Allyn&Bacon,1982. [5] MatyasT,GreenwoodK.Visualanalysisofsingle-casetimeseries:Eectsofvariability,serialdependence,andmagnitudeofinterventioneects.JournalofAppliedBehaviorAnalysis1990;23(3):341. [6] JohnsonM,OttenbacherK.Trendlineinuenceonvisualanalysisofsingle-subjectdatainrehabilitationresearch.Disability&Rehabilitation1991;13(2):55{59. [7] OttenbacherK,CusickA.Anempiricalinvestigationofinterrateragreementforsingle-subjectdatausinggraphswithandwithouttrendlines.JournaloftheAssociationforPersonswithSevereHandicaps1991;. [8] StocksJ,WilliamsM.Evaluationofsinglesubjectdatausingstatisticalhypothesistestsversusvisualinspectionofchartswithandwithoutcelerationlines.Journalofsocialserviceresearch1995;20(3-4):105{126. [9] OttenbacherK.Visualinspectionofsingle-subjectdata:Anempiricalanalysis.MentalRetardation1990;. [10] KrishefC.Fundamentalapproachestosinglesubjectdesignandanalysis.KriegerPub.Co.,1991. [11] TryonW.Asimpliedtime-seriesanalysisforevaluatingtreatmentinterventions.JournalofAppliedBehaviorAnalysis1982;15(3):423. [12] PhillipsJ.Seriallycorrelatederrorsinsomesingle-subjectdesigns.BritishJournalofMathematicalandStatisticalPsychology1983;36(2):269{280. [13] ToothakerL,BanzM,NobleC,CampJ,DavisD.N=1designs:Thefailureofanova-basedtests.JournalofEducationalandBehavioralStatistics1983;8(4):289{309. [14] SharpleyC,AlavosiusM.Autocorrelationinbehavioraldata:Analternativeperspective.1988;. [15] SuenH,LeeP,OwenS.Eectsofautocorrelationonsingle-subjectsingle-facetcrossed-designgeneralizabilityassessment.BehavioralAssessment1990;12:305{315. 59

PAGE 60

[16] GottmanJ.Time-seriesanalysis:Acomprehensiveintroductionforsocialscientists,vol.400.CambridgeUniversityPressCambridge,1981. [17] CrosbieJ.Interruptedtime-seriesanalysiswithbriefsingle-subjectdata.JournalofConsultingandClinicalPsychology1993;61(6):966. [18] RosnerB,Mu~nozA,TagerI,SpeizerF,WeissS.Theuseofanautoregressivemodelfortheanalysisoflongitudinaldatainepidemiologicstudies.StatisticsinMedicine1985;4(4):457{467. [19] RosnerB,Mu~nozA.Autoregressivemodellingfortheanalysisoflongitudinaldatawithunequallyspacedexaminations.StatisticsinMedicine1988;7(1-2):59{71. [20] BoxG,TiaoG.Interventionanalysiswithapplicationstoeconomicandenvironmentalproblems.JournaloftheAmericanStatisticalAssociation1975;:70{79. [21] BoxG,JenkinsG,ReinselG.Timeseriesanalysis:forecastingandcontrol.PrenticeHall,1994. [22] DasGuptaA.Asymptotictheoryofstatisticsandprobability.SpringerVerlag,2008. [23] IhakaR,GentlemanR.R:Alanguagefordataanalysisandgraphics.Journalofcomputa-tionalandgraphicalstatistics1996;:299{314. [24] DavisG,WilcoxM.Adultaphasiarehabilitation:Appliedpragmatics.College-HillPressSanDiego,CA,1985. [25] ZuckerD,RuthazerR,SchmidC.Individual(n-of-1)trialscanbecombinedtogivepopulationcomparativetreatmenteectestimates:methodologicconsiderations.Journalofclinicalepidemiology2010;63(12):1312{1323. [26] GolayX,KolliasS,StollG,MeierD,ValavanisA,BoesigerP.Anewcorrelation-basedfuzzylogicclusteringalgorithmforfMRI.MagneticResonanceinMedicine1998;40(2):249{260. [27] LiaoW,etal..Clusteringoftimeseriesdata{asurvey.PatternRecognition2005;38(11):1857{1874. [28] KalpakisK,GadaD,PuttaguntaV.DistancemeasuresforeectiveclusteringofARIMAtime-series.ProceedingsoftheIEEEInternationalConferenceonDataMining,Citeseer,2001;273{280. [29] AlonsoA,BerrenderoJ,HernandezA,JustelA.Timeseriesclusteringbasedonforecastdensities.ComputationalStatistics&DataAnalysis2006;51(2):762{776. [30] PiccoloD.AdistancemeasureforclassifyingARIMAmodels.JournalofTimeSeriesAnalysis1990;11(2):153{164. [31] MaharajE.Clusteroftimeseries.JournalofClassication2000;17(2):297{314. 60

PAGE 61

[32] CorduasM,PiccoloD.Timeseriesclusteringandclassicationbytheautoregressivemetric.Computationalstatistics&dataanalysis2008;52(4):1860{1872. [33] LehmannE,RomanoJ.Testingstatisticalhypotheses.SpringerVerlag,2005. [34] NewboldP.Theexactlikelihoodfunctionforamixedautoregressive-movingaverageprocess.Biometrika1974;61(3):423{426. 61

PAGE 62

BIOGRAPHICALSKETCH OleksandrSavenkovwasbornin1983inUkraine.HeobtainedhisdegreeinFinancialMathematicsfromDonetskNationalUniversityin2004.AfterhisgraduationhehadbeenworkingfortwoyearsasaneconomistinRaieisenBankAval.OleksandrjoinedtheDe-partmentofStatisticsattheUniversityofFloridaasagraduatestudentin2006.Duringhisstudyhewasateachingassistantforseveralundergraduateandgraduateclassesandresearchassistantonseveralscienticprojects. 62