167
Politecnico di Milano SCUOLA DI INGEGNERIA INDUSTRIALE E DELL’INFORMAZIONE Corso di Laurea Magistrale in Ingegneria Matematica Tesi di Laurea Magistrale Permutational inference for functional-on-scalar linear mixed-effect models applied to equine accelerometric data Relatore Prof. Simone Vantini Correlatore Ing. Alessia Pini Candidato Alessia Serafini Matr. 819016 Anno Accademico 2014–2015

Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Politecnico di Milano

SCUOLA DI INGEGNERIA INDUSTRIALE E DELL’INFORMAZIONE

Corso di Laurea Magistrale in Ingegneria Matematica

Tesi di Laurea Magistrale

Permutational inference for functional-on-scalarlinear mixed-effect models applied to equine

accelerometric data

Relatore

Prof. Simone Vantini

Correlatore

Ing. Alessia Pini

Candidato

Alessia SerafiniMatr. 819016

Anno Accademico 2014–2015

Page 2: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 3: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

“When you have eliminated the impossible,whatever remains, however improbable,

must be the truth.”

— Sir Arthur Conan Doyle, “The Sign of the Four”

Alessia Serafini: Permutational inference for functional-on-scalar linear mixed-effect models applied to equine accelerometric data | Tesi di Laurea Magistrale inIngegneria Matematica, Politecnico di Milano.c© Copyright Aprile 2016.

Politecnico di Milano:www.polimi.it

Scuola di Ingegneria Industriale e dell’Informazione:www.ingindinf.polimi.it

Page 4: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 5: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Abstract

Lameness detection and quantification in horses is an important, but oftendifficult, task for veterinarians. For this reason, many instrumented methodshave been developed to offer objective measurements as a support to clinicalvisual examinations. In this Thesis, kinematic data consisting of three-dimensionalacceleration signals of eight horses are studied. Each horse was measured ninetimes: before induction of lameness (sound) and after induction of two degrees oflameness in each of the four legs by means of a modified horseshoe with a screweliciting pressure on the sole of the hoof. The aim of this work is to investigateif and how the location of the lameness influences the shape of the observedcurves. To achieve this goal, a functional-on-scalar linear mixed-effect model forthe acceleration signals has been proposed. Techniques coming from FunctionalData Analysis and non-parametric inference have been exploited and combined,giving birth to a new approach to test for significance of fixed and random effectsbased on permutation procedures. Furthermore, identification of portions of thedomain imputable of rejecting the null hypothesis is made possible through theapplication of the Interval-Wise Testing method, which relies on the definition ofan adjusted p-value function able to control the interval-wise error rate. Resultsshow that different lame limbs have different effects on vertical acceleration curves.Instead, transversal and longitudinal accelerations of horses with lame hindlimbscannot be easily distinguished from signals of a sound horse.

KEYWORDS: horses; lameness; 3D accelerations; functional data analysis; non-parametric inference; permutation test; functional linear mixed model; functionalmixed-effect ANOVA.

v

Page 6: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 7: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Sommario

Rilevare e quantificare il livello di zoppia nei cavalli è un compito molto importan-te, ma spesso difficile, per i veterinari. Per questa ragione, molti metodi sono statisviluppati per offrire delle misurazioni oggettive come supporto all’esame clinico,che consiste in una valutazione visiva dei movimenti dell’animale. In questa tesivengono studiati dei dati cinematici, nello specifico i segnali tridimensionali relativialle misurazioni delle accelerazioni di otto cavalli. Ogni cavallo è stato misuratonove volte: prima dell’induzione della zoppia (cavallo sano) e dopo l’induzione didue diversi gradi di zoppia in ognuna delle quattro zampe, tramite un apposito ferrodi cavallo munito di una vite che provoca una pressione sulla suola dello zoccolo.L’obiettivo di questo lavoro è quello di esaminare se e come la posizione della zoppiainfluenza la forma delle curve di accelerazione osservate. Per raggiungere questoobiettivo, un modello lineare a effetti misti per risposte funzionali e covariate scalariè stato proposto. Varie tecniche provenienti dall’ambito della Functional DataAnalysis e da quello dell’inferenza non parametrica sono state sfruttate e combinate,dando vita a un nuovo metodo per testare la significatività di effetti fissi e casualitramite procedure permutazionali. Inoltre, la selezione degli intervalli del dominioresponsabili del rifiuto dell’ipotesi nulla è resa possibile attraverso l’utilizzo delmetodo Interval-Wise Testing, che si basa sulla definizione di una funzione p-valueaggiustata in grado di controllare l’interval-wise error rate. I risultati mostranoche ogni zampa infortunata provoca un diverso effetto nelle curve di accelerazioneverticale. Invece, le accelerazioni trasversali e longitudinali di cavalli con una zoppianelle zampe posteriori non sono distinguibili da quelle di un cavallo sano.

PAROLE CHIAVE: cavalli; zoppia; accelerazioni 3D; analisi di dati funzionali;inferenza non-parametrica; test permutazionali; modelli lineari funzionali a effettimisti; ANOVA funzionale a effetti misti.

vii

Page 8: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 9: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Contents

Introduction 1

1 State of the Art 31.1 Equine Lameness . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.1.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.1.2 Lameness diagnosis . . . . . . . . . . . . . . . . . . . . . . . 51.1.3 Quantitative methods for lameness identification . . . . . . . 6

1.2 Permutational inference for functional data . . . . . . . . . . . . . . 91.2.1 Inference for functional-on-scalar linear models . . . . . . . . 11

2 Methodology 172.1 Interval-Wise Testing for functional data . . . . . . . . . . . . . . . 17

2.1.1 Functional IWT procedure . . . . . . . . . . . . . . . . . . . 182.2 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

2.2.1 Functional-on-scalar linear model . . . . . . . . . . . . . . . 212.2.2 Functional-on-scalar linear mixed model . . . . . . . . . . . 222.2.3 A particular case: one-way FANOVA . . . . . . . . . . . . . 24

2.3 Testing for fixed effects . . . . . . . . . . . . . . . . . . . . . . . . . 252.3.1 Application of IWT procedure to test fixed effects . . . . . . 26

2.4 Testing for random effects . . . . . . . . . . . . . . . . . . . . . . . 282.4.1 Application of IWT procedure to test a random effect . . . . 29

2.5 Freedman and Lane permutation scheme . . . . . . . . . . . . . . . 30

3 Dataset 333.1 Data acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

3.1.1 Experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . 343.2 Preprocessing of data . . . . . . . . . . . . . . . . . . . . . . . . . . 343.3 Different representations of data . . . . . . . . . . . . . . . . . . . . 35

3.3.1 Two-peaks representations . . . . . . . . . . . . . . . . . . . 353.3.2 Difference between peaks representations . . . . . . . . . . . 37

3.4 Covariates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403.4.1 lameLeg and lameForeHind . . . . . . . . . . . . . . . . . . 413.4.2 lameDegree . . . . . . . . . . . . . . . . . . . . . . . . . . . 413.4.3 horse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

ix

Page 10: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

x CONTENTS

4 Results of test for the fixed effect 474.1 Results of the Original Datasets with fixed effect lameLeg . . . . . . 49

4.1.1 VERTICAL Original Dataset . . . . . . . . . . . . . . . . . 494.1.2 TRANSVERSAL Original Dataset . . . . . . . . . . . . . . 534.1.3 LONGITUDINAL Original Dataset . . . . . . . . . . . . . . 57

4.2 Results of the Modified Datasets with fixed effect lameForeHind . . 614.2.1 VERTICAL Modified Dataset . . . . . . . . . . . . . . . . . 614.2.2 TRANSVERSAL Modified Dataset . . . . . . . . . . . . . . 654.2.3 LONGITUDINAL Modified Dataset . . . . . . . . . . . . . 68

4.3 Results of the Modified Datasets with fixed effect lameForeHind_Degree 724.3.1 VERTICAL Modified Dataset . . . . . . . . . . . . . . . . . 724.3.2 TRANSVERSAL Modified Dataset . . . . . . . . . . . . . . 764.3.3 LONGITUDINAL Modified Dataset . . . . . . . . . . . . . 80

5 Results of test for the random effect 855.1 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855.2 Results of the Original Datasets with fixed effect lameLeg . . . . . . 86

5.2.1 VERTICAL Original Dataset . . . . . . . . . . . . . . . . . 865.2.2 TRANSVERSAL Original Dataset . . . . . . . . . . . . . . 885.2.3 LONGITUDINAL Original Dataset . . . . . . . . . . . . . . 90

5.3 Results of the Modified Datasets with fixed effect lameForeHind . . 925.3.1 VERTICAL Modified Dataset . . . . . . . . . . . . . . . . . 925.3.2 TRANSVERSAL Modified Dataset . . . . . . . . . . . . . . 945.3.3 LONGITUDINAL Modified Dataset . . . . . . . . . . . . . 96

5.4 Results of the Modified Datasets with fixed effect lameForeHind_Degree 985.4.1 VERTICAL Modified Dataset . . . . . . . . . . . . . . . . . 985.4.2 TRANSVERSAL Modified Dataset . . . . . . . . . . . . . . 1005.4.3 LONGITUDINAL Modified Dataset . . . . . . . . . . . . . 102

6 Conclusions 105

A Graphical results of test for the fixed effect of Peak1 - Peak2Datasets 109A.1 Results of the Original Peak1 - Peak2 Datasets with fixed effect

lameLeg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110A.2 Results of the Modified Peak1 - Peak2 Datasets with fixed effect

lameForeHind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117A.3 Results of the Modified Peak1 - Peak2 Datasets with fixed effect

lameForeHind_Degree . . . . . . . . . . . . . . . . . . . . . . . . . 124

B Graphical results of test for the random effect of Peak1 - Peak2Datasets 131B.1 Results of the Original Peak1 - Peak2 Datasets with fixed effect

lameLeg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132B.2 Results of the Modified Peak1 - Peak2 Datasets with fixed effect

lameForeHind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

Page 11: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

CONTENTS xi

B.3 Results of the Modified Peak1 - Peak2 Datasets with fixed effectlameForeHind_Degree . . . . . . . . . . . . . . . . . . . . . . . . . 140

Bibliography 145

Page 12: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 13: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

List of Figures

1.1 Trotting horse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.1 Comparison between Original and Modified Datasets . . . . . . . . 373.2 Comparison between Original and Modified Peak1-Peak2 Datasets . 393.3 lameLeg groups in the Original Datasets . . . . . . . . . . . . . . . 423.4 lameForeHind groups in the Modified Datasets . . . . . . . . . . . . 433.5 Vertical Original accelerations of the eight horses involved in the

experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

4.1 Results of the four different tests for significance of the fixed effectlameLeg in the Vertical Original Dataset . . . . . . . . . . . . . . . 51

4.2 Results of the restricted - LM pairwise test for significance of thefixed effect lameLeg in the Vertical Original Dataset . . . . . . . . 52

4.3 Results of the four different tests for significance of the fixed effectlameLeg in the Transversal Original Dataset . . . . . . . . . . . . . 55

4.4 Results of the restricted - LM pairwise test for significance of thefixed effect lameLeg in the Transversal Original Dataset . . . . . . 56

4.5 Results of the four different tests for significance of the fixed effectlameLeg in the Longitudinal Original Dataset . . . . . . . . . . . . 59

4.6 Results of the restricted - LM pairwise test for significance of thefixed effect lameLeg in the Longitudinal Original Dataset . . . . . . 60

4.7 Results of the four different tests for significance of the fixed effectlameForeHind in the Vertical Modified Dataset . . . . . . . . . . . 63

4.8 Results of the restricted - LM pairwise test for significance of thefixed effect lameForeHind in the Vertical Modified Dataset . . . . 64

4.9 Results of the four different tests for significance of the fixed effectlameForeHind in the Transversal Modified Dataset . . . . . . . . . 66

4.10 Results of the restricted - LM pairwise test for significance of thefixed effect lameForeHind in the Transversal Modified Dataset . . 67

4.11 Results of the four different tests for significance of the fixed effectlameForeHind in the Longitudinal Modified Dataset . . . . . . . . 70

4.12 Results of the restricted - LM pairwise test for significance of thefixed effect lameForeHind in the Longitudinal Modified Dataset . . 71

4.13 Results of the four different tests for significance of the fixed effectlameForeHind_Degree in the Vertical Modified Dataset . . . . . . 74

4.14 Results of the restricted - LM pairwise test for significance of thefixed effect lameForeHind_Degree in the Vertical Modified Dataset 75

xiii

Page 14: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

xiv LIST OF FIGURES

4.15 Results of the four different tests for significance of the fixed effectlameForeHind_Degree in the Transversal Modified Dataset . . . . 78

4.16 Results of the restricted - LM pairwise test for significance of the fixedeffect lameForeHind_Degree in the Transversal Modified Dataset 79

4.17 Results of the four different tests for significance of the fixed effectlameForeHind in the Longitudinal Modified Dataset . . . . . . . . 82

4.18 Results of the restricted - LM pairwise test for significance of thefixed effect lameForeHind_Degree in the Longitudinal ModifiedDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

5.1 Results of the test for significance of the random effect horse in theVertical Original Dataset . . . . . . . . . . . . . . . . . . . . . . . . 87

5.2 Results of the test for significance of the random effect horse in theTransversal Original Dataset . . . . . . . . . . . . . . . . . . . . . . 89

5.3 Results of the test for significance of the random effect horse in theLongitudinal Original Dataset . . . . . . . . . . . . . . . . . . . . . 91

5.4 Results of the test for significance of the random effect horse in theVertical Modified Dataset . . . . . . . . . . . . . . . . . . . . . . . 93

5.5 Results of the test for significance of the random effect horse in theTransversal Modified Dataset . . . . . . . . . . . . . . . . . . . . . 95

5.6 Results of the test for significance of the random effect horse in theLongitudinal Modified Dataset . . . . . . . . . . . . . . . . . . . . . 97

5.7 Results of the test for significance of the random effect horse in theVertical Modified Dataset . . . . . . . . . . . . . . . . . . . . . . . 99

5.8 Results of the test for significance of the random effect horse in theTransversal Modified Dataset . . . . . . . . . . . . . . . . . . . . . 101

5.9 Results of the test for significance of the random effect horse in theLongitudinal Modified Dataset . . . . . . . . . . . . . . . . . . . . . 103

A.1 Results of the four different tests for significance of the fixed effectlameLeg in the Vertical Original Peak1-Peak2 Dataset . . . . . . . 111

A.2 Results of the restricted - LM pairwise test for significance of thefixed effect lameLeg in the Vertical Original Peak1-Peak2 Dataset . 112

A.3 Results of the four different tests for significance of the fixed effectlameLeg in the Vertical Original Peak1-Peak2 Dataset . . . . . . . 113

A.4 Results of the restricted - LM pairwise test for significance of thefixed effect lameLeg in the Transversal Original Peak1-Peak2 Dataset114

A.5 Results of the four different tests for significance of the fixed effectlameLeg in the Longitudinal Original Peak1-Peak2 Dataset . . . . . 115

A.6 Results of the restricted - LM pairwise test for significance of thefixed effect lameLeg in the Longitudinal Original Peak1-Peak2 Dataset116

A.7 Results of the four different tests for significance of the fixed effectlameForeHind in the Vertical Modified Peak1-Peak2 Dataset . . . 118

A.8 Results of the restricted - LM pairwise test for significance of thefixed effect lameForeHind in the Vertical Modified Peak1-Peak2Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

Page 15: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

LIST OF FIGURES xv

A.9 Results of the four different tests for significance of the fixed effectlameForeHind in the Vertical Modified Peak1-Peak2 Dataset . . . 120

A.10 Results of the restricted - LM pairwise test for significance of thefixed effect lameForeHind in the Transversal Modified Peak1-Peak2Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

A.11 Results of the four different tests for significance of the fixed effectlameForeHind in the Longitudinal Modified Peak1-Peak2 Dataset 122

A.12 Results of the restricted - LM pairwise test for significance of the fixedeffect lameForeHind in the Longitudinal Modified Peak1-Peak2Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

A.13 Results of the four different tests for significance of the fixed effectlameForeHind_Degree in the Vertical Modified Peak1-Peak2 Dataset125

A.14 Results of the restricted - LM pairwise test for significance of the fixedeffect lameForeHind_Degree in the Vertical Modified Peak1-Peak2Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

A.15 Results of the four different tests for significance of the fixed effectlameForeHind_Degree in the Vertical Modified Peak1-Peak2 Dataset127

A.16 Results of the restricted - LM pairwise test for significance of thefixed effect lameForeHind_Degree in the Transversal ModifiedPeak1-Peak2 Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . 128

A.17 Results of the four different tests for significance of the fixed effectlameForeHind_Degree in the Longitudinal Modified Peak1-Peak2Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

A.18 Results of the restricted - LM pairwise test for significance of thefixed effect lameForeHind_Degree in the Longitudinal ModifiedPeak1-Peak2 Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . 130

B.1 Results of the test for significance of the random effect horse in theVertical Original Peak1-Peak2 Dataset . . . . . . . . . . . . . . . . 133

B.2 Results of the test for significance of the random effect horse in theTransversal Original Peak1-Peak2 Dataset . . . . . . . . . . . . . . 134

B.3 Results of the test for significance of the random effect horse in theLongitudinal Original Peak1-Peak2 Dataset . . . . . . . . . . . . . 135

B.4 Results of the test for significance of the random effect horse in theVertical Modified Peak1-Peak2 Dataset . . . . . . . . . . . . . . . . 137

B.5 Results of the test for significance of the random effect horse in theTransversal Modified Peak1-Peak2 Dataset . . . . . . . . . . . . . . 138

B.6 Results of the test for significance of the random effect horse in theLongitudinal Modified Peak1-Peak2 Dataset . . . . . . . . . . . . . 139

B.7 Results of the test for significance of the random effect horse in theVertical Modified Peak1-Peak2 Dataset . . . . . . . . . . . . . . . . 141

B.8 Results of the test for significance of the random effect horse in theTransversal Modified Peak1-Peak2 Dataset . . . . . . . . . . . . . . 142

B.9 Results of the test for significance of the random effect horse in theLongitudinal Modified Peak1-Peak2 Dataset . . . . . . . . . . . . . 143

Page 16: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 17: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

List of Tables

2.1 Methods to test fixed and random effects. . . . . . . . . . . . . . . 31

3.1 Categorical variables relative to horse B1 . . . . . . . . . . . . . . . 40

4.1 Methods to test fixed effects. . . . . . . . . . . . . . . . . . . . . . . 47

xvii

Page 18: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 19: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

List of Acronyms

AAEP American Association of Equine Practitioners

ANOVA ANalysis Of VAriance

BLUP Best Linear Unbiased Predictors

FDA Functional Data Analysis

FWER Family Wise Error Rate

GLMM Generalized Linear Mixed Model

GRF Ground Reaction Force

ITP Interval Testing Procedure

IWER Interval Wise Error Rate

IWT Interval Wise Testing

LF Left Fore

LH Left Hind

LM Linear Model

LMM Linear Mixed Model

LR Likelihood Ratio

ML Maximum Likelihood

OLS Ordinary Least Squares

PVF Peak Vertical Force

REML REstricted Maximum Likelihood

RF Right Fore

RH Right Hind

xix

Page 20: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 21: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Introduction

In recent years, the growing interest in horses for racing and riding activities has

stimulated scientific research in equine locomotion. The most frequently reported

health issue affecting horses is lameness, an alteration of the gait pattern which can

be caused by either a structural or a functional disorder of the locomotor system.

This physical problem can be devastating to the athletic performance of the horse,

since it may force the withdrawal of the animal from sports competitions. Attempts

to avoid a great economical loss due to lameness and difficulties in establishing a

diagnosis, have led to the development of a great number of instrumented methods

for equine gait analysis and lameness quantification.

Motivated by all of these facts, data collected at the University of Copenhagen

and consisting of 3D acceleration signals of trotting horses are the object of the

analyses presented in this Thesis. Eight horses were led by hand in trot over a

distance of 24 m at constant velocity and were equipped with an accelerometer

placed at the lowest point of the back in the midline. The accelerometer measured

the three-dimensional accelerations of trunk movements of each horse nine times:

before induction of lameness (sound) and after mechanical induction of two degrees

(low and moderate) of lameness in each of the four legs.

The aim of this work is to analyse these data to investigate how lameness

influences the vertical, transversal and longitudinal component of the 3D records.

Each of the signal components consists of a series of discrete observations from

a continuous-time signal. As a consequence, they can be regarded as functions

of time and can be studied with the tools provided by Functional Data Analysis

(FDA), a lively research area in statistics. As a first step, a functional-on-scalar

linear mixed-effect model for the data is developed, i.e. a linear model characterised

by a functional response, in this case represented by one of the three components

of the acceleration vector, and scalar fixed and random effects. In our model, the

1

Page 22: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

2 INTRODUCTION

label identifying the lame limb is treated as a fixed effect, while the horse’s ID is

introduced in the model as a random intercept in order to take into account the

variation induced in the acceleration pattern due to each horse’s particular gait.

After that, we are interested in seeing if these effects are statistically significant in

our model and most of all, we want to select the intervals of the domain in which

they are significant.

In the field of FDA, the development of suitable inferential techniques is still a

recent and challenging topic of high importance for practitioners. This problem

is currently addressed from a parametric or a non-parametric perspective. The

former relies on distributional assumptions (e.g. homoscedasticity, normality,

regular exponential family, random sampling, etc.) and/or asymptotic results

which could be unrealistic or assumed for mere convenience. For example, in the

case of functional data, normality is a very demanding assumption that proves to

be practically impossible to verify. For this reason, in this work we opt for the

non-parametric approach, generally based on computational intensive permutation

or bootstrap techniques.

Testing for significance of fixed and random effects by means of permutational

approaches is an element of novelty when dealing with functional linear mixed

models. In fact this approach has not been explored yet in other works.

To detect the portions of the domain imputable of the rejection of the null

hypothesis, we make use of a purely non-parametric inferential procedure called

Interval-Wise Testing (IWT), that introduces an adjusted p-value function able

to control the interval-wise error rate, in detail given any interval of the domain

where the null hypothesis is not violated, the probability of wrongly selecting it is

controlled.

In this Thesis, all these methods are explained in detail and then applied to

our dataset. In particular this work is structured as follows: Chapter 1 presents a

review of literature regarding both equine lameness identification and inferential

methods based on permutations. Chapter 2 describes the different methodological

aspects used to make inference on our functional data. Chapter 3 contains the

description of the dataset and finally, in Chapter 4 and Chapter 5 the results of our

analyses as applications of the methodologies described in Chapter 2 are presented.

Conclusions are reported in Chapter 6.

Page 23: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Chapter 1

State of the Art

1.1 Equine Lameness

During the traditional clinical lameness examination, the veterinarian evaluates

the locomotion pattern of the horse at trot to score subjectively the severity of

the lameness, to identify the lame limb and to hypothesise the anatomical location

and the severity of the locomotor injury. Recognition of lameness is a key skill to

successful diagnosis, but even for an expert orthopaedic, the correct identification

of the lame limb is not easily achievable, especially when the lameness degree is not

severe and the clinical symptoms are not displayed. Besides, due to the subjectivity

of the evaluation, different clinicians may give different diagnosis. Consequently the

use of mathematical and statistical tools is an important aspect to allow lameness

quantification and support the analysis of the clinicians.

1.1.1 Terminology

Some technical terms related to the horses’ movements are defined (Barrey,

1999) in this Section, in order to allow a better comprehension of the following

analysis and results.

• A gait is a complex and strictly coordinated rhythmic and automatic move-

ment of the limbs and the entire body of the animal which result in the

production of progressive movements. Two types of gait can be distinguished

by the symmetry or asymmetry of the limb movement sequence with respect

to time and the median plane of the horse:

3

Page 24: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4 CHAPTER 1. STATE OF THE ART

Figure 1.1: Trotting horse: stance phase of the right diagonal, suspension phase, stancephase of the left diagonal, suspension phase.

– symmetric gaits: walk, tölt, pace, trot;

– asymmetric gaits: canter, gallop.

• The stride is a full cycle of limb motion. Since the pattern is repeated, the

beginning of the stride can be at any point in the pattern and the end of that

stride at the same place in the beginning of the next pattern.

• A complete gait cycle includes a stance phase when the limb is in contact

with the ground and swing phase when the limb is not in contact with the

ground. During the suspension phase at trot, pace, canter or gallop, there

is no hoof contact with the ground.

Among the large variety of gaits a horse can perform, lameness detection is

usually made at trot.

The trot is a two-beat diagonal gait of the horse where the diagonal pairs of legs

move forward at the same time with a moment of suspension between each beat.

As shown in Figure 1.1, there is a stance phase of the right-fore and left-hindlimb

and then a stance phase of the left-fore and right-hindlimb, each one followed by a

suspension phase. In the following right-fore and left-hindlimb will be referred to

as right diagonal or RF-LH diagonal, while the left-fore and right-hindlimb as

left diagonal or LF-RH.

The fact that trot is the fastest symmetrical gait (on average about 8 miles per hour

- 13 km/h) makes it the most suitable one for lameness examination and assessment.

Page 25: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

1.1. EQUINE LAMENESS 5

1.1.2 Lameness diagnosis

Lameness is an alteration of the horse’s gait due to pain and can be manifested

as a change in attitude or performance.

The veterinarians usually watch the horse walking and trotting in a straight line

on a flat, hard surface (this provides an opportunity to listen to the footfall and to

consider this information along with the visual appraisal). The horse is observed

from the front, back and both side views, so that any deviations in gait (such as

winging or paddling), failure to land squarely on all four feet and the unnatural

shifting of weight from one limb to another can be noted. The detection of the

compensatory movements performed by a horse to adapt to lameness is an integral

part of the diagnosis. The most consistent sign of a unilateral forelimb lameness is

the head nod. The head and neck of the horse rise when the lame forelimb strikes

the ground and is weight bearing, and fall when the sound limb strikes the ground.

The sacral (pelvic) rise is the most easily observed sign of hindlimb lameness. The

entire pelvis and sacrum rise when the lame limb strikes the ground and is weight

bearing, and fall when the sound limb strikes the ground. Both head nod and sacral

rise serve to reduce concussion on the lame limb (Adams and Stashak’s, 2011).

The horse also walks and trots in circles, on a lunge, in a round pen and under

saddle. The veterinarians look for signs, such as shortening of the stride, irregular

foot placement, head bobbing, stiffness, weight shifting, etc.. Both forelimb and

hindlimb lameness may become worse when the horse is circled; most of the time,

the lameness is accentuated when the affected limb is on the inside of the circle.

Evaluating the physical condition can be challenging since more subtle lameness

causes fewer compensatory changes, making lameness diagnosis more difficult, and

problems within the axial skeleton (back) may also alter the movement of the limbs.

Moreover lameness may appear as a slight shortening of the stride, or the condition

may be so severe that the horse will not bear weight on the affected limb. With such

extremes of lameness possible, a lameness grading system has been developed by the

American Association of Equine Practitioners (AAEP) to aid both communication

and record-keeping.

Description of the six levels of the AAEP scoring system, as reported on their

website (http://www.aaep.org/):

• 0: Lameness is not perceptible under any circumstances.

Page 26: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

6 CHAPTER 1. STATE OF THE ART

• 1: Lameness is difficult to observe and is not consistently apparent, regardless

of circumstances (e.g. under saddle, circling, inclines, hard surface, etc.).

• 2: Lameness is difficult to observe at a walk or when trotting in a straight line

but consistently apparent under certain circumstances (e.g. weight-carrying,

circling, inclines, hard surface, etc.).

• 3: Lameness is consistently observable at a trot under all circumstances.

• 4: Lameness is obvious at a walk.

• 5: Lameness produces minimal weight bearing in motion and/or at rest or a

complete inability to move.

Even if using this scale helps the clinicians to express their diagnosis, the visual

identification of a lame limb depends also on some characteristics of the observing

subject (his experience and training, his personal judgment parameters, etc.) and

these may lead to disagreeing diagnosis given by different examiners. This fact

is confirmed by the analysis carried out by Thomsen et al., 2010a, in which two

experienced equine practitioners independently scored lameness based on video

recordings of trotting horses using the AAEP scale: the percentage of agreements

was 70%, while the percentages of one- and 2-point disagreements were 23.3 and

6.7%, respectively.

Since the visual examination of the physical condition of a horse presents so

many difficulties, it would be helpful for veterinarians to support their clinical

judgment with the application of objective instrumented methods. Some of these

procedures will be presented in the following Section (1.1.3).

1.1.3 Quantitative methods for lameness identification

The first experimental measurements on horse’s locomotion were undertaken

independently by Marey and Muybridge at the end of 19th century (Barrey, 1999).

Since then, many techniques of lameness identification and quantification have been

developed to provide an objective analysis of horses’ gait by means of statistical

and mathematical tools. In literature several approaches have been explored in

order to examine how the gait pattern of horses is affected by the presence of a

lame limb: some of them are reported below.

Page 27: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

1.1. EQUINE LAMENESS 7

Abnormalities in gait can be recorded with kinetic equipment: external forces

can be measured through electronic force sensors that record the ground reaction

forces when the hooves are in contact with the ground. The sensors can be installed

either on the ground in a force plate or in a force shoe device, attached under

the hoof. When a body stands on or moves across a force plate, this measuring

instrument can provide the force amplitude and orientation (vector coordinates in

three dimensions), the coordinates of the application point of the force and the

moment value at this point. In Back et al., 2007 a floor-mounted force plate was

used to determine peak vertical force (PVF) expressed in percent body weight (N

force/N body weight); a lameness score was visually assigned to each horse using

the AAEP lameness scale described above. The relationship between the PVF and

the AAEP score was explored with a regression analysis: the results pointed out

that horses with a front lame limb showed a decrease in front-limb loadings. The

paper also demonstrate that interbreed difference should be taken into account

when comparing specific grades of lameness of two groups of horses. While the

force platform has a fixed location, the force shoe, directly fixed on the horse hoof,

allows the evaluation of the ground reaction in various types of exercise; the main

disadvantage of this device is that it adds weight and thickness to the horse’s regular

hoof. Furthermore, force plates recently have been combined with pressure plates,

which allows new possibilities to study not only balance in conformation and gait,

but also hoof balance.

Evaluation of the asymmetry in head and trunk movements has a major role in

lameness examination. Because of Newton’s second law and the fact that trunk

contains most body mass, asymmetries in head and trunk movements allow lame

horses to reduce the vertical ground reaction force in their painful limb: these are

called compensatory movements. Therefore several methods have been developed to

quantify objectively the severity of equine lameness using head and trunk kinematic

data: Fourier analysis of kinematic variables has proved to be an effective tool

for the study of cyclic live motion pattern since it separates the symmetrical and

the asymmetrical parts. Usually these data are collected using skin markers and

cameras to record their motion, such as in Peham et al., 1996 and in Audigié et al.,

2002. In the former one marker is placed on the head and the other one on the

lateral hoof wall of one forelimb (hindlimb lameness is not taken into account in this

Page 28: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

8 CHAPTER 1. STATE OF THE ART

work). In the latter the analysis of the symmetry of movements of the cranial and

caudal parts of the trunk are combined: to distinguish fore- and hindlimb lameness,

it could be hypothesized that the symmetry of trunk displacements is more altered

in the cranial part of the trunk in forelimb lamenesses and in the caudal part of

the trunk in hindlimb lamenesses. In order to detect also a lame hindlimb, four

retroreflective skin markers were placed on the dorsal midline of the trunk of each

horse and one additional marker was glued to the dorsolateral wall of each fore

hoof.

Not only the peak vertical displacement, but also velocity and acceleration

of head, withers, tuber sacrale and both tuber coxae were quantified at different

phases of the stride in Buchner et al., 1996. Changes in these variables due to

lameness and symmetry indices calculated as quotients of the values during the

lame and nonlame stance phase were analysed using a two-way analysis of variance.

This work confirmed that during both fore- and hindlimb lameness at the trot, the

vertical velocity of the trunk at impact of the lame limb decreased, during the lame

stance phase the trunk was kept higher above the ground, maximal acceleration

decreased and displacement amplitude was smaller than without lameness.

Compared to other approaches, measuring accelerations offers great advantages

such as low cost and simple instrumentation which allows the collection of measure-

ment both in laboratory or in field conditions, because all equipment is mounted on

the horse. Furthermore, since reaction forces take place on the level of second-order

derivatives, acceleration measurements are expected to be more informative about

the locomotive apparatus. This type of analysis can be found in papers like Sørensen

et al., 2012; Thomsen et al., 2010a,b, in which vertical accelerations are smoothed

to a Fourier series expansion and then registered. The obtained signals are used to

compute different symmetry scores which take into account different aspects, for

example the overall symmetry of the acceleration, the symmetry of loading of the

left and right diagonals and the difference in phase of the two diagonals. Symmetry

scores from PCA are also explored in Sørensen et al., 2012. Another example of

analysis of accelerometric data with symmetry indices can be found in Uhlir et al.,

1997, where the head acceleration asymmetry (HAAS) and the sacrum acceleration

asymmetry (SAAS) were used for quantification of fore- and hindlimb lameness

respectively.

Page 29: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

1.2. PERMUTATIONAL INFERENCE FOR FUNCTIONAL DATA 9

The data analysed in this Thesis consist in all the three components of the

acceleration vector (as functions of time), hence they set in this last contest. For a

detailed description of the dataset see Chapter 3.

1.2 Permutational inference for functional data

In this Section mathematical and statistical tools regarding the analysis of

functional data are introduced in order to provide a background before approaching

the next chapters.

In the recent decades, the development of more and more precise acquisition

devices in many research areas has led to the recording of high resolution, and so

high dimensional, data (“large p, small n” problems). Functional Data Analysis

(FDA) fits in this framework: data are no longer p-dimensional vectors, but functions

belonging to an infinite dimensional separable Hilbert space, for instance the L2

space, which is the natural extension of the Euclidean geometry to the FDA

(Ramsay and Silverman, 2002, 2005). Although several techniques to explore this

kind of data are available, how to perform inference is still a debated issue in this

field. The major problem for the analysis of these data is represented by the fact

that many classical multivariate inferential tools (e.g., Hotelling’s theorem) are

not straightforwardly generalizable in the FDA framework, since they require the

number of sample units to be greater than the dimension of the space in which data

are observed. Consequently, the growing interest for the analysis of functional data

is urging the development of inferential techniques suited for any value of n and p.

One way to deal with these issues is the use of methods based on paramet-

ric inference, which relies on distributional assumptions (e.g. homoscedasticity,

normality, regular exponential family, random sampling, etc.) and/or asymptotic

results (Cuevas et al., 2004; Horváth and Kokoszka, 2012). This approach, however,

implies assumptions that could be unrealistic, unclear or practically impossible to

verify. In contrast, non-parametric approaches commonly rely on computational

intensive permutation or bootstrap techniques and try to keep assumptions at a

lower workable level, avoiding those that are difficult to justify or interpret, possibly

without excessive loss of inferential efficiency.

Although the first description of permutation tests can be traced back to the first

Page 30: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

10 CHAPTER 1. STATE OF THE ART

half of the 20th century (Fisher, 1935), it is only in recent years, with the increase

in computer performances, that they have begun to be exploited in applications.

A permutation test is essentially based on a family of transformations which

preserve the likelihood under the null hypothesis H0 (i.e., it is satisfied the so called

exchangeability condition under the null hypothesis) and on a suitable test statistic

T which is stochastically larger under the alternative hypothesis H1 than under

H0 (Pesarin and Salmaso, 2010). Under the null hypothesis H0, all the possible

rearrangements or permutations of the data which satisfy the exchangeability

condition are equally likely. Hence, if the null hypothesis H0 is true, the discrete

distribution of the test statistic applied on the permuted data T ∗ can be computed

by exploring all the possible permutations of the observed data. The p-value of the

test is given by the proportion of permuted scenarios in which the test statistic

evaluated on the permutations T ∗ is greater than or equal to the value of the test

statistic applied on the observed data T0. As the amount of data increases, the exact

enumeration of all permutations becomes computationally unfeasible. Therefore

only a subset of the permutations is explored through a Conditional Monte Carlo

algorithm, generating an approximated distribution of the test statistic applied

on the permuted data T ∗. While the steps are straightforward to implement, the

challenge lies in selecting an appropriate test statistic and determining how to

permute the data correctly.

In general, permutation tests are known to be conditional methods of inference,

where the conditioning is done with respect to a set of sufficient statistics in H0 for

the underlying population distribution. The conditioning may be done on different

sets of sufficient statistics, but it seems reasonable to condition on a minimal set

in order to make the best use of the available information: in the non-parametric

framework this requirement is generally met by referring to the observed data,

as no further reduction of dimensionality is possible without loss of information.

This kind of conditioning and the assumed exchangeability with respect to groups

under H0 make permutation tests independent of the underlying likelihood model

related to the population distribution. Moreover they imply the exactness of the

permutation tests. When the exchangeability property of data is not satisfied or

cannot be assumed in the null hypothesis, permutation inferences are generally not

exact.

Page 31: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

1.2. PERMUTATIONAL INFERENCE FOR FUNCTIONAL DATA 11

Inference related to linear models and linear mixed models is one of the most

interesting and widely studied topic in statistics. In literature many strategies

to test for significance of fixed and random effects have been proposed, both in

the scalar and in the functional framework: among all the possible approaches,

permutation tests are powerful tools in this context.

Some of these methods are reported in Subsection 1.2.1.

1.2.1 Inference for functional-on-scalar linear models

Over the last few years, functional and in particular functional-on-scalar (func-

tional response and parameters, scalar covariates) linear models and linear mixed

models have been extensively studied, as the development of modern techniques,

which enable the collection of high-resolution time-continuous data, has allowed

their application in many fields of research (Ramsay and Silverman, 2002, 2005).

In this context, many of the empirically relevant questions do not only address

the effect of covariates and variance components on a functional response, but also

require identification of time intervals characterized by effects of specific covariates

or variance components significantly different from zero (domain selection). To

do that, global tests for the parameters of the model are not suitable, since they

cannot state which parts of the domain are imputable of the rejection of the null

hypothesis.

To overcome this issue, different approaches can be considered. One solution is

to provide point-wise confidence bands for the functional parameters: the results

indicate in which parts of the domain the covariates have an effect, but the control

of the probability of type I error is just point-wise, because point-wise limits are not

equivalent to confidence regions for the entire estimated curves. As a consequence

conclusion are only to be drawn at specific points.

Another method is the Interval Testing Procedure (ITP), introduced by Pini

and Vantini, 2013 and applied to the functional-on-scalar linear models in Pini,

2014: data are represented on a suitable high-dimensional ordered functional basis,

and a family of tests is performed (either with a parametric or non-parametric

approach) on the coefficients of the basis expansion, by controlling the Family Wise

Error Rate (FWER) on intervals (i.e. the probability that a part of the domain is

wrongly detected as significant is always controlled). A drawback with this type of

Page 32: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

12 CHAPTER 1. STATE OF THE ART

procedure is that it strongly relies on the choice of the basis expansion.

A new procedure, called Interval-Wise Testing (IWT) has been recently proposed

by Pini and Vantini, 2015 to test functional data and select intervals of the domain

where the null hypothesis is rejected. With respect to ITP it does not require the

projection of data on a finite dimensional functional basis. This method relies on

the definition of adjusted p-value function provided with a control of the Interval

Wise Error Rate (IWER), i.e., the control of the probability of wrongly rejecting any

interval of the domain. In Abramowicz et al., 2015, IWT is applied to a functional-

on-scalar linear model to test various hypotheses on the functional parameters. In

this Thesis this approach will be extended to test for significance of both fixed and

random effects in functional-on-scalar linear mixed models (see Chapter 2).

Permutation tests for fixed effects

Various permutational strategies have been suggested for a test of significance

for a single regression variable in a linear model. Such tests may be influenced by

the presence of one or more other variables in addition to the one tested, indeed

there’s not a general agreement concerning how to perform exact partial tests in

linear multiple regression (i.e. tests in the presence of concomitant variables). When

taking into account the potential relationship (collinearity) between the predictor

variables, the most well-known techniques are permutation of raw data (Manly,

1991, 1997), permutation of residual under the reduced model (Freedman and Lane,

1983; Kennedy, 1995) and permutation of residuals under the full model (ter Braak

1990, 1992).

Results of simulations designed to compare empirically the behaviour of these

methods are presented in Anderson and Legendre, 1999; Anderson and Robinson,

2001. In these works the properties of the different methods with respect to type

I error and power have been investigated and their relationships theoretically

examined showing that permutation of raw data, permutation under the reduced

model in the manner of Freedman and Lane and permutation under the full model

all gave asymptotically equivalent results in most situations, with no significant

difference in power among any of them. In presence of normal or exponential errors,

all these three methods matched the normal theory t-test and had type I error

rate close to the level α. However in situations of extremely non-normal error

Page 33: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

1.2. PERMUTATIONAL INFERENCE FOR FUNCTIONAL DATA 13

distributions, they converge asymptotically to appropriate type I error much more

quickly than the normal-theory t-test. Lastly, Kennedy method resulted in inflated

type I error for data of virtually all kinds, especially at small sample sizes.

The results found for the scalar case can be equally applied in multivariate

situations, where the data generally do not fulfill assumption required by traditional

parametric testing procedures. Likewise, these results are valid for individual

terms in ANOVA designs, since ANOVA with fixed factors is simply a special case

of multiple regression, but with categorical predictor variables. Anyway, when

dealing with complex ANOVA designs (such as two-way ANOVA, nested hierarchies,

presence of interaction terms, etc.) two additional strategies can be considered:

restricted permutations (i.e., allowing permutations to occur only within levels of

other factors) and permutation of units other than the observations (e.g., permuting

the units induced by a nested factor in the test of a higher ranked factor). The

second strategy may be pertinent in designs with random factors: to construct an

exact test for the fixed effect, permutations should be restricted to occur within

levels of the random factor (Anderson and Ter Braak, 2003).

Permutation tests for random effects

Linear mixed models (LMMs) are a rich class of models characterized by the

presence of both fixed and random effects. LMMs are often used to fit longitudinal

or repeated measures data, where outcomes for a limited number of subjects are

collected repeatedly over time, or with multilevel or clustered data, where random

effects are used to account for the within-level or within-cluster correlations.

Inference regarding the inclusion or exclusion of random effects is one of the most

challenging problems in this context due to the fact that the variance components

are equal to 0 under the null hypothesis, a value that is located on the boundary

of the parameter space. Consequently, the asymptotic distribution of the Wald,

score and likelihood ratio (LR) statistics under H0 will no longer be the typical χ2.

Instead, the correct null distribution for these statistics has been proved to be a

mixture of χ2 distributions.

Even in this framework, permutation tests are a useful alternative to the

parametric methods, as they are known to have nominal size in finite samples while

requiring only a few weak assumptions. A permutation approach to test for random

Page 34: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

14 CHAPTER 1. STATE OF THE ART

effects was presented by Fitzmaurice et al., 2007. The test was specifically designed

for multilevel studies where inclusion of a single random effect to quantify the

heterogeneity among the different levels may be required. Under H0, the cluster

indices are simply random labels and any permutation of them is equally likely.

Specifically, the cluster indices are randomly permuted while holding fixed the

number of units within a cluster. This strategy provides a one-sided p-value for

the LR (or score) test statistic that has the correct type I error rate under the

null, regardless of the number of levels in the data structure, the number of units

at any given level and the choice of link function. However, this test is limited to

the setting at hand and cannot be generalized to longitudinal studies and other

correlated data sources if there are multiple random effects or a single continuous

random effect, such as time.

The work of Lee and Braun, 2012 is a generalization to the approach of Fitz-

maurice et al. and leads to a pair of permutation tests that allow for inference

with any number and type of random effects in a LMM. The first test statistic is

given by the sample variance of the Best Linear Unbiased Predictors (BLUPs) for

the random effect and the second statistic is the restricted likelihood ratio. The

null permutation distributions of these statistics are computed by permuting the

residuals both within and among subjects and are valid both asymptotically and in

small samples. While the test based on the BLUPs can test one random effect at a

time, one of the advantages of the LR based permutation test is that it can address

simultaneous inference on multiple random effects. Detailed theoretical properties

and simulation studies on these methods (both in the case of LMM and GLMM)

can be found in Lee, 2012.

Also the strategy proposed by Drikvandi et al., 2013 handles testing any subset

of variance components: the distribution of a suitable statistic is approximated

through randomly permuting the individual indices of the correct exchangeable

units, while the number of repeated measurements for each individual are kept

fixed. The simulation results suggest that this test has the correct type I error rate,

and its efficiency is reasonably well in comparison to the F-test, and the LR test

based on Fitzmaurice et al., 2007 (in case of non-normal random effects this latter

test appears to be the most powerful).

Regarding functional linear mixed models, although much work has been done on

Page 35: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

1.2. PERMUTATIONAL INFERENCE FOR FUNCTIONAL DATA 15

the estimation, there are only few papers which deal with inference in these or more

complex models. One of the first to take into account inference in this framework

was Guo, 2002: it suggested a likelihood ratio test for testing the fixed-effects

using the connection between cubic smoothing splines (at the design points) and

LMMs, and the non-standard asymptotic theory for LR tests. However, test for the

random effects was not considered. In Antoniadis and Sapatinas, 2007 a wavelet

decomposition approach was used to model both fixed effects and random effects

in the same functional space, implying that the population-average curve and the

subject-specific curves have the same smoothness property. Unlike the previous

one, this work provides formal frequentist functional testing procedures for both

fixed effects and random effects, adapting methodologies in linear mixed effects and

non-parametric regression models.

From a review of literature it has been found that, although methods involving

permutation tests have been exploited in the field of LMMs (as described above),

they have not been applied yet in the context of functional linear mixed models.

Motivated by this gap in literature and by the many benefits provided by permuta-

tion techniques, in the next Chapter a strategy based on IWT and permutation

tests will be developed in order to investigate the significance of both fixed and

random effects in a functional LMM.

Page 36: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 37: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Chapter 2

Methodology

In this Chapter all the methodologies used to develop our analysis of the

accelerometric data are introduced. In particular in Section 2.1 the Interval-Wise

Testing procedure on which all our tests are based is described. Afterwards, we will

see how this method is applied to testing for significance of fixed and random effects

in LM and LMM (2.3 and 2.4). In Section 2.5 the Freedman and Lane technique to

perform permutation tests is explained.

2.1 Interval-Wise Testing for functional data

The overwhelming majority of non-parametric and parametric available methods

for hypothesis testing in Functional Data Analysis are global, in the sense that they

provide a unique result over the whole domain of the curves. Hence, if there is

enough evidence to reject the null hypothesis, they are not able to identify which

parts of the domain has led to rejection. This fact could make them not fully

satisfactory, since the selection of the intervals where the null hypothesis is false

(domain selection) is a desired property, especially in some applications.

The Interval-Wise Test (IWT) introduced by Pini and Vantini, 2015 is a a purely

non-parametric inferential procedure able to detect the portions of the domain

imputable of rejecting the null hypothesis for functional data. This approach has

the great advantage that it neither rely on a discretisation of the data by means

of a basis expansion nor on the choice of the initial partition of the domain in

sub-intervals: therefore, the IWT is a totally data-driven inferential method.

The procedure will be presented in a general inferential framework in FDA

17

Page 38: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

18 CHAPTER 2. METHODOLOGY

(Subsection 2.1.1), while two specific applications of the IWT will be reported in

Sections 2.3 and 2.4.

2.1.1 Functional IWT procedure

Consider a set of functional data belonging to the Hilbert space L2 and defined

over the domain T = (a, b) ⊂ R: the aim is to test a functional null hypothesis

H0 against an alternative H1, defining an R-valued functional test statistic that

could be used to test H0 globally. In case of rejection of the null hypothesis H0,

the purpose is the selection of the intervals of the variable t ∈ T where significant

differences are detected. This problem can be virtually addressed by performing an

infinite family of tests on all the points t of the domain (a, b). Then the challenge

is to control the IWER arising from the continuous infinity of multiple (dependent)

hypotheses tests. To achieve this goal, the IWT procedure is applied, following

these three steps:

Interval-wise testing

Let I ⊆ T be an interval or a complementary interval of the form I = (t1, t2)

or I = T \ (t1, t2) with a ≤ t1 < t2 ≤ b, respectively. Furthermore we define as HI0and HI1 the restriction of the null and alternative hypotheses on I.

For every open interval, and complementary interval I of the domain, we perform

the functional test:

HI0 vs HI1 (2.1)

Testing these hypotheses can be done using different strategies depending on

the assumptions on data and on the test at hand. If the assumption of functional

normality seems not realistic, one can rely on non-parametric permutation methods.

In the case of testing difference between two or more functional populations, an exact

permutation test for (2.1) can be achieved by evaluating a suitable test statistic

T I over all possible permutations of the data over the sample units. In a more

general framework an exact (asymptotically exact) permutation test can be achieved

by choosing a family of (asymptotically) likelihood invariant transformations of

the data set, and evaluating T I over all possible transformations. The p-value of

the corresponding test, denoted by pI , is the proportion of the corresponding test

Page 39: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

2.1. INTERVAL-WISE TESTING FOR FUNCTIONAL DATA 19

statistics evaluated on permuted data exceeding the statistics evaluated on the

original data set. As usual, low values of pI indicate statistical evidence to reject

the null hypothesis in I.

Definition of the p-value functions

The family of interval-wise tests defined in the first phase, is used to define the

unadjusted and adjusted functional p-values. A point-wise p-value function is not

trivially defined in L2, since each element of this functional space is an equivalence

class defined on the equivalence relation infinitely often with respect to the Lebesgue

measure.

Definition 2.1. Let H0 and H1 denote, respectively, the null and alternative

functional hypotheses, and HI0 and HI1 their restriction on I. Finally, let pI denote

the p-value of the functional test of HI0 against HI1 . Then, the unadjusted p-value

function p(t) and the adjusted p-value function p(t) are defined ∀t ∈ T as:

p(t) = lim supI→t

pI ; p(t) = supI3t

pI(t),

where with the notation I → t, we indicate that both the extremes of the interval

I converge to t.

Note that, even though in the L2 framework it is meaningless to talk about point-

wise evaluations of the functions, the boundedness of the p-values pI guarantees that

both the unadjusted and the adjusted p-values are instead well defined ∀t ∈ T . Theunadjusted and the adjusted p-value functions p(t) and p(t) have some remarkable

properties:

• The unadjusted p-value p(t) is provided with a control of the point-wise error

rate, that is,

∀t ∈ T s.t. ∃I 3 t : HI0 is true⇒ P[p(t) ≤ α] ≤ α

• The adjusted p-value p(t) is provided with a control of the interval-wise error

rate, that is,

∀I ⊆ T : HI0 is true⇒ P[∀t ∈ I, p(t) ≤ α] ≤ α

Page 40: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

20 CHAPTER 2. METHODOLOGY

• The unadjusted p-value function p(t) is point-wise consistent, i.e. the proba-

bility of truly detecting any point t for which the null hypothesis is not true

converge to one as the sample size increases. In details, ∀α ∈ (0, 1):

∀t ∈ T s.t. @I 3 t : HI0 is true⇒ P[p(t) ≤ α] −−−→n→∞

1

• The adjusted p-value function p(t) is interval-wise consistent, i.e the probability

of truly detecting any interval I for which the null hypothesis is not true

∀t ∈ I converge to one as the sample size increases. In details, ∀α ∈ (0, 1):

∀I ⊆ T s.t. @J ⊆ I : HJ0 is true⇒ P[∀t ∈ I, p(t) ≤ α] −−−→n→∞

1

For further details and the proofs of the properties see Pini and Vantini, 2015.

Domain selection

Once a significance level α ∈ (0, 1) for the test is chosen, intervals of the domain

presenting a rejection of the null hypothesis are obtained by thresholding the p-value

functions evaluated in the previous step. In detail, if we are only interested in

controlling the point-wise error rate at level α (i.e., given any point of the domain

where the null hypothesis is not violated, the probability of wrongly selecting it as

significant is controlled), we select the points t ∈ T such that p(t) ≤ α. If instead

we are interested in controlling the interval-wise error rate at level α (i.e., given any

interval of the domain where the null hypothesis is not violated, the probability

of wrongly selecting it as significant is controlled), we select the points t ∈ T such

that p(t) ≤ α.

2.2 Models

Suppose we have observed a sample of n continuous L2 random functions over

time t s.t. t ∈ (a, b). The continuity of the functional data yi(t) is a natural

assumption in the analysis of accelerations. However the procedure can still be

applied even if this assumption is relaxed, as shown in Pini and Vantini, 2015.

In the following we introduce two models for yi(t):

Page 41: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

2.2. MODELS 21

• functional-on-scalar Linear Model (Subsection 2.2.1)

• functional-on-scalar Linear Mixed Model (Subsection 2.2.2)

2.2.1 Functional-on-scalar linear model

Model

yi(t) = β0(t) +G∑g=1

xigβg(t) + εi(t), ∀i = 1, ..., n (2.2)

Where:

• yi(t), t ∈ (a, b) is the i-th functional response;

• xi1, ..., xiG ∈ R are known scalar covariates related to the i-th observation;

• βg(t), g = 0, ..., G are the unknown functional parameters;

• errors εi(t), t ∈ (a, b) are i.i.d. (with respect to units) zero-mean random

functions (not necessarily Gaussian) with finite total variance, i.e.

∫ b

a

E[εi(t)]2dt <∞, ∀i = 1, ..., n.

Using the matrix notation this model can be expressed as:

y = Xβ + ε (2.3)

Where y is the functional vector containing the n observed functions, β is the

(G+ 1)-vector of parameter functions, ε is a vector of n residual functions and X is

the n× (G+ 1) design matrix.

The only way in which (2.3) differs from the corresponding equations on the general

linear model is that the parameter β, and hence the predicted observations Xβ,

are vectors of functions rather than vectors of numbers.

Model Estimation

The ordinary least squares (OLS) estimators of the functional parameters

βg(t), g = 0, ..., G, can be found by minimizing the residual sum of squares (with

Page 42: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

22 CHAPTER 2. METHODOLOGY

respect to βg(t), g = 0, ..., G), which in this specific case consists of the sum over

units of the squared L2 distances between the functional data yi(t) and the quantity

β0(t) +∑G

g=1 xigβg(t).

n∑i=1

∫ b

a

(yi(t)− β0(t)−G∑g=1

xigβg(t))2dt (2.4)

If there are no particular restrictions on the way in which the parameters vary

as functions of t, the minimization of (2.4) can be done individually for each t, as

in vector-on-scalar linear models. That is, the OLS estimates can be calculated

for a suitable grid of values of t using ordinary regression analysis (Ramsay and

Silverman, 2005):

(β0(t), ..., βG(t)) = arg min(β0(t),...,βG(t))

n∑i=1

(yi(t)− β0(t)−G∑g=1

xigβg(t))2 (2.5)

(In matrix notation: β = (XTX)−1XTy)

For each t, βg(t) are thus the OLS estimators of the corresponding scalar-on-scalar

linear model at point t. Note that the fact that the same design matrix is involved

for each t makes for considerable economy of numerical effort.

2.2.2 Functional-on-scalar linear mixed model

Model

yij(t) = β0(t) +G∑g=1

xijgβg(t) +K∑k=1

zijkbjk(t) + εij(t), ∀i = 1, ..., nj; j = 1, ..., J

(2.6)

• yij(t), t ∈ (a, b) is the i-th functional response of the j-th subject, i =

1, ..., nj; j = 1, ..., J with nj number of observations of the j-th subject, J

number of subjects;

• xij1, ..., xijG ∈ R are known fixed effect (scalar) covariates;

• zij1, ..., zijK ∈ R are known random effect (scalar) covariates;

Page 43: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

2.2. MODELS 23

• βg(t), g = 0, ..., G are the unknown population-level fixed effect functional

coefficients;

• bjk(t), k = 1, ..., K are the unknown functional random effects; for any fixed

t ∈ (a, b), the vector b(t)j = (bj1(t), ..., bjK(t)) is assumed to have a multivariate

distribution with mean 0 and covariance matrix Σ(t), in which the respective

variances for bj1(t), ..., bjK(t) are denoted as σ2bj1

(t), ..., σ2bjK

(t);

• errors εij(t) are i.i.d. (with respect to units) zero-mean random functions

with variance σ2ε(t), t ∈ (a, b). A further assumption is that for each j, b(t)j

and εij(t) are independent.

Equivalently, the LMM for subject j can be written using matrix notation as:

yj = Xjβ + Zjbj + εj

Where yj is the functional vector containing the nj observed functions relative to

subject j, β is the (G+ 1)-vector of fixed effect parameters functions, bj is the K

dimensional vector of functional random effects, ε = (ε1j, ..., εnjj) is a vector of njresidual functions and Xj and Zj are the subject-specific design matrices for the

G+ 1 fixed effect and K random effect covariates, respectively.

The general model expression can be obtained combining data from all subjects.

Let y = (y1, ...,yJ) be the n-dimensional vector of functional observations, b =

(b1, ..., bJ) the vector of functional random effects of all subjects and ε = (ε1, ..., εJ)

the n-dimensional vector of functional errors, where n =∑J

j=1 nj . Furthermore, let

X and Z be the respective design matrices for the fixed and random effect covariates

formed by successively placing each subject’s design matrices under each other.

Then the model will be:

y = Xβ + Zb+ ε (2.7)

In addition to that, for any fixed t ∈ (a, b):

V ar

b(t)ε(t)

=

Q(t) 0

0 R(t)

Where Q(t) = Σ(t) ⊗ IQ and R(t) = σ2

ε(t)IR, in which ⊗ denotes the Kronecker

product, and IQ(t) and IR are J × J and n× n identity matrices.

Page 44: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

24 CHAPTER 2. METHODOLOGY

Model Estimation

Estimation of the elements of β, Q(t), and R(t) at any fixed t is typically done

through maximum likelihood (ML) or restricted maximum likelihood (REML).

Asymptotically, the ML and REML estimators are equivalent, but for small sample

sizes, the REML estimator is expected to be less biased than the maximum likelihood

estimator. Subject specific random effects b = (b1, ..., bJ) can be predicted using

best linear unbiased prediction (BLUP). The quantities of interest can be obtained

solving the following equations given by Henderson in 1950 (Lee and Braun, 2012),

where for simplicity of notation the time index is omitted:

XTR−1Xβ + XTR−1Zb = XTR−1y

ZTR−1Xβ + (ZTR−1Z +Q−1)b = ZTR−1y

The solutions are:

β = (XT V−1

X)−1XT V−1

y

b = QZV−1e

Where e = y −Xβ and V = ZT QZ + R is the estimated covariance matrix for y.

In general, b can be interpreted as realized values of the random vector b.

For the purpose of this Thesis, only LMM with a single random intercept are

considered. Consequently, in the following we will refer to linear mixed models

meaning the particular case of K = 1 and with zij1 constant and equal to 1, i.e.:

yij(t) = β0(t) +G∑g=1

xijgβg(t) + bj1(t) + εij(t), ∀i = 1, ..., nj; j = 1, ..., J (2.8)

2.2.3 A particular case: one-way FANOVA

Here we present the Functional Analysis of Variance (FANOVA) model as a

particular case of a linear model. Anyway it can be generalized to the case of a

linear mixed model, where besides the fixed factor, one or more random effects are

present.

yig(t) = µ(t) + τg(t) + εig(t), ∀i = 1, ..., ng g = 1, ..., G (2.9)

Page 45: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

2.3. TESTING FOR FIXED EFFECTS 25

Where:

• yig(t), t ∈ (a, b) is the i-th observation of the g-th treatment, i = 1, ..., ng g =

1, ..., G with ng number of observations belonging to the g-th treatment, G

number of treatment levels;

• µ(t), t ∈ (a, b) is the grand mean function;

• τg(t), t ∈ (a, b) is the g-th treatment effect; to be able to identify them

uniquely, we require that they satisfy the constraint:

G∑g=1

τg(t) = 0, ∀t ∈ (a, b);

• errors εig(t), t ∈ (a, b) are i.i.d. (with respect to units) zero-mean random

functions (not necessarily Gaussian) with finite total variance, i.e.

∫ b

a

E[εi(t)]2dt <∞, ∀i = 1, ..., n.

The model (2.9) has an equivalent formulation of the form (2.2). In particular,

we can define the matrix X with n =∑G

g=1 ng rows (one for each observation) and

(G+ 1) columns. The label (ig) can be used to indicate the row corresponding to

observation i in group g; this row has a one in the first column and in column g+ 1,

and zeroes in the rest. The element x(ig)k indicates the value in row (ig) and column

k of X. We define also a corresponding set of (G+ 1) regression functions βk such

that β = (β1, β2, ..., βG+1) = (µ, τ1, ..., τG). Consequently the model becomes:

yig(t) =G+1∑k=1

x(ig)kβk(t) + εig(t), ∀i = 1, ..., ng; g = 1, ..., G (2.10)

Or, more compactly:

y = Xβ + ε.

2.3 Testing for fixed effects

In this Section, we will introduce the problem of testing for significance of

fixed effects both in the case of a functional-on-scalar linear model (LM) and a

Page 46: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

26 CHAPTER 2. METHODOLOGY

functional-on-scalar linear mixed model (LMM).

Referring to the models (2.2) and (2.6) we are interested in testing if none of

the covariates associated to the fixed effects significantly affects the response, i.e.,

the functional version of classical F -test:H0 : βg(t) = 0 ∀g ∈ {1, ..., G}, ∀t ∈ (a, b)

H1 : βg(t) 6= 0 for some g ∈ {1, ..., G} and some t ∈ (a, b)(2.11)

In case of rejection of the null hypothesis H0, the purpose is the selection of

the intervals of the variable t where significant differences are detected. To do

that, we apply the procedure previously described in a more general framework in

Subsection 2.1.1.

2.3.1 Application of IWT procedure to test fixed effects

Interval-wise testing

A functional test consistent with (2.11) is performed on every interval of the

domain. In particular, given any I ⊆ (a, b), we test the restriction of H0 on interval

I: HI0 : βg(t) = 0 ∀g ∈ {1, ..., G}, ∀t ∈ I

HI1 : βg(t) 6= 0 for some g ∈ {1, ..., G} and some t ∈ I(2.12)

For both LM and LMM we use the following test statistic:

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt (2.13)

Where SSE(t)/dfexpl is the explained sum of squares divided by its degrees of

freedom and SSR(t)/dfres is the residual sum of squares divided by its degrees of

freedom.

In the particular case of the linear model, the statistic defined above is described

by the formula:

T Ifixed =

∫I

(n−G)∑n

i=1(yi(t)− y(t))2

(G− 1)∑n

i=1(yi(t)− yi(t))2dt (2.14)

Where yi(t) = β0(t) +∑G

g=1 xigβg(t) is the fitted part of the model and y(t) =

Page 47: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

2.3. TESTING FOR FIXED EFFECTS 27

∑ni=1 yi(t)/n is the sample mean of the response functions.

Instead, in LMM, the denominator degrees of freedom are upper bounds for the

real df. This is because the F -test is always an approximation for these models.

The reason why these degrees of freedom are not more accurately approximated at

present is because it is difficult to decide exactly how this should be done for this

kind of models (Bates, 2005).

In this work, hypothesis testing is done using functional permutation tests

based on the Freedman and Lane permutation scheme and on the test statistic

mentioned above (the steps of this procedure are reported in 2.5). The Freedman

and Lane permutation strategy relies on the permutation of the estimated residuals

under the reduced model (i.e., the model under the null hypothesis of the test),

which it is the most commonly used scheme for linear models. As pointed out

in Anderson and Legendre, 1999 and Anderson and Robinson, 2001, this method

showed better properties in terms of type I error and power compared to other

permutation techniques.

We also considered two different strategies to permute the residuals:

• Unrestricted permutations

This is the original approach proposed by Freedman and Lane: the residuals

of the reduced models are permuted randomly, without any constraint;

• Restricted permutations

Permutations of the residuals are allowed to occur only within levels of the

(unique) random factor, as suggested by Anderson and Ter Braak, 2003: in

this way, one can take into account the existence of a random effect, even

if not present in the model. Note that using this method, the procedure is

still valid because it only restricts the set of all possible permutations and it

applies likelihood-invariant transformations also if the random effect is not

included in the model.

Page 48: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

28 CHAPTER 2. METHODOLOGY

Computation of the adjusted p-value function

The adjusted p-value function is defined as the maximum p-value of all interval-

wise tests on intervals containing t:

p(t) = supI3t

pI (2.15)

where pI is the p-value of the test (2.12).

Theoretically, the definition of adjusted p-value functions implies the evaluation

of the p-values of the infinite family of all possible interval-wise tests. In practice

this can be avoided, thanks to the continuity of the test statistic with respect to

the extremes of integration: the p-values of tests on intervals I can be discretised

on a fine grid, and the sup in the definition of adjusted p-value functions can be

approximated with its discrete counterpart.

Domain selection

Intervals of the domain presenting a rejection of the null hypothesis are obtained

selecting the points t where the adjusted p-value function is smaller than the (chosen)

significance level α. Since the test of hypothesis (2.11) based on the statistic Tfixedis provided with a control of the IWER, by rejecting H0, we have that, given any

interval in which the response is not influenced by any covariate, the probability

that this interval is wrongly selected as significant is lower than α.

2.4 Testing for random effects

Let us consider the model (2.8). We are interested in investigating if the presence

of the random intercept b1 is significant for the model. This is equivalent to testing:H0 : σ2bj1

(t) = 0 ∀j ∈ {1, ..., J}, ∀t ∈ (a, b)

H1 : σ2bj1

(t) > 0 for some j ∈ {1, ..., J} and some t ∈ (a, b)(2.16)

The challenge in testing for random effects lies in the fact that the value of the

variance component under the null hypothesis is on the boundary of the parameter

space. As a result, the usual χ2 asymptotic distributions of the Wald, score, and

Page 49: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

2.4. TESTING FOR RANDOM EFFECTS 29

likelihood ratio test statistics do not hold. Instead, the correct null distribution for

the likelihood ratio statistic has been proved to be a mixture of χ2 distributions.

The approach described in the next Subsection relies on the likelihood ratio

based permutation test suggested in Lee and Braun, 2012 and Lee, 2012, extended

to the functional data framework.

2.4.1 Application of IWT procedure to test a random effect

Interval-wise testing

A functional test consistent with (2.16) is performed on every interval of the

domain. In particular, given any I ⊆ (a, b), we test the restriction of H0 on interval

I: HI0 : σ2

bj1(t) = 0 ∀j ∈ {1, ..., J}, ∀t ∈ I

HI1 : σ2bj1

(t) > 0 for some j ∈ {1, ..., J} and some t ∈ I(2.17)

This test is based on the test statistic:

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt (2.18)

Where λt = −2 log (LHt0− LHt

1) is the likelihood ratio test statistic: LHt

0and LHt

1

are the likelihoods under the null and alternative hypotheses restricted on the point

t, respectively. The expression exp(∫I log(f(t))dt

)is called geometric integral of

the function f(·) and can be thought of as a “continuous” version of a “discrete”

product.

Under the null hypothesis of no random effects, the residuals ε = y − Xβ

are exchangeable, and more specifically, independent and identically normally

distributed with mean 0 and variance σ2ε . Hence, following the Freedman and Lane

permutation scheme, the estimated residuals ε can be permuted both within and

between subjects.

Using the same notation as in Section 2.2.2 (omitting the index t), we have

E[y] = Xβ and V ar[y] = V . We want to use the same statistic of the parametric

case, that is built under the assumption y ∼ N (Xβ,V ). Note that normality is

assumed to built the test statistic but it is not needed to perform the permutation

test. At this point, replacing all parameters with their estimates under the null and

Page 50: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

30 CHAPTER 2. METHODOLOGY

alternative hypotheses (as denoted by their subscripts), λ becomes:

λ = log

(|V 0||V 1|

)+ eT1 (V

−10 − V

−11 )e1 + log

(|XT V

−10 X|

|XT V−11 X|

)

V 0 and V 1 are re-estimated for each permutation of the residuals. By doing so, we

allow the empirical distribution to “mix” as the rank of Σ varies, thereby generating

a distribution similar to the mixture χ2 asymptotic distribution.

Note that this test, as pointed out in Lee and Braun, 2012 and Lee, 2012, can

also address simultaneous inference on multiple random effects.

Computation of the adjusted p-value function and domain selection

This two steps of the IWT procedure are carried out in the same way as in

Subsection 2.3.1.

2.5 Freedman and Lane permutation scheme

In this Section, we give some details on the implementation of the Freedman

and Lane permutation scheme for testing hypotheses (2.11) and (2.16) for each

interval I ⊆ (a, b).

Freedman and Lane permutational procedure

1. Evaluate the reference test statistic T0 on the observed data;

2. Estimate the residuals of the reduced model;

3. Repeat the following B times:

i. Permute randomly the residuals of the reduced model;

ii. Compute the new permuted data;

iii. Evaluate the statistic T ∗b on the permuted data;

4. Calculate the p-value of the test as the proportion of permuted scenarios in

which the test statistic T ∗b which is greater or equal to the reference value T0.

In Table 2.1 the reduced model associated to the null hypothesis is specified for

each of the tests described in the previous sections.

Page 51: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

2.5. FREEDMAN AND LANE PERMUTATION SCHEME 31

Table 2.1: Methods to test fixed and random effects.

Model H0 Reduced Model Permutations

LM βg(t) = 0, ∀g ∀t yi(t) = β0(t) + εi(t)UnrestrictedRestricted

LMM βg(t) = 0, ∀g ∀t yij(t) = β0(t) + bj1(t) + εij(t)UnrestrictedRestricted

LMM σ2bj1

(t) = 0,∀j ∀t yij(t) = β0(t) +∑G

g=1 xijgβg(t) + εij(t) Unrestricted

Page 52: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 53: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Chapter 3

Dataset

In this Chapter a description of the dataset provided by the University of

Copenhagen is presented (see also Sørensen et al., 2012; Thomsen et al., 2010b). All

experimental procedures were pre-approved by the Danish Animal Experimentation

Board and the study was performed according to the Danish Animal Testing Act.

3.1 Data acquisition

A 10G, three-axis piezo-resistant accelerometer was held firmly in place by an

elastic girth at the lowest point of the dorsal back region in the midline (approx-

imately above T13) and connected to a data-logger mounted on another girth.

The horses were led by hand in trot over a distance of 24 m at constant velocity

and were videotaped during the measurement. The accelerometer measured the

three-dimensional accelerations of trunk movements at a frequency of 240 Hz, and

the raw data signal was filtered to remove micro-structure noise using a Butterworth

filter with a cut-off frequency of 50 Hz.

Each record is represented by a 3D acceleration signal, which consists of a

number of observations varying from 1100 to 1400 for each component and it is

acquired in a time interval of about 6 s. Each of these signals is originally composed

of M = 8 parts of equal length, referred to as M cycles, and since trot is a two-beat

gait, each cycle is composed of two halves corresponding to the two diagonal pairs

of limbs. In other words, a complete data signal consists of M replications of a

bi-phased signal.

33

Page 54: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

34 CHAPTER 3. DATASET

3.1.1 Experiment

The experiment studied in this Thesis involved eight horses. Each horse was

measured nine times: before induction of lameness (sound) and after induction

of two degrees of lameness in each of the four legs. The lameness was induced

mechanically by equipping the horses with a modified horseshoe with a screw

eliciting pressure on the sole of the hoof. The shoe makes stance on the limb painful.

The two degrees, in the following denoted low-degree lameness and moderate-degree

lameness, correspond to different levels of this pressure. Two data signals are

unavailable, resulting in a total of 70 signals.

3.2 Preprocessing of data

Based on the 3D signal, the ground reaction force (GRF) was computed as the

length of the 3D vector after subtracting gravity. The obtained signal was rescaled

to unit interval in order to make signals comparable across time arguments and

treated as a discrete equidistantly observed function. The GRF record was then

smoothed to a Fourier basis with 501 basis functions by minimizing a standard least

squares criterion and after that, to a period Fourier basis with 81 basis functions

and a period of 1/8 to create a periodic target function.

At this point, a warping function was computed to warp the smoothed GRF

record towards the periodic target obtained from the GRF record itself. The

warping function was estimated from the register.fd() function of the R-package

fda. The so called “function parameter object”-argument was chosen to penalize

the integral of the squared second order derivative of the warping function and the

penalty parameter was set to 0.01.

The warping function obtained from the GRF record was used to warp all three di-

rections (vertical, transversal and longitudinal) using the function register.newfd()

of the fda-package. The warped signals were evaluated at 8001 grids points and

averaged over eight gait cycles to give a signal representing an average gait cycle at

1001 grid points. Note that up to this point the preprocessing was done separately

on each record, obtaining a sort of “average cycle”. In the final step, on the sample

of all the “average cycles”, a shift registration toward the cross sectional mean was

performed in order to minimize the L2-norm between each signal and the cross

Page 55: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

3.3. DIFFERENT REPRESENTATIONS OF DATA 35

sectional mean. This procedure is required to account for differences in what is

defined as a starting point of a gait cycle for different records and, even if it allows

for non-linear warping functions, for most records the estimated warp turns out to

be more or less linear.

At that point the sample of shift registered “average cycles” were evaluated

at 1001 grid points. Extracting every tenth observation, the version of the data

analysed in this thesis is finally obtained.

3.3 Different representations of data

Lameness may result in non-repetitious movements (single events) that increase

the difference between gait cycles and reduce the overall impression of a repeated

two-beat gait pattern. In order to diminish the effect of such single events, all our

analysis are based on an average signal over eight gait cycles or transformations of

it. For the purpose of our work, we considered four different representations of the

data, which will be introduced in Subsections 3.3.1 and 3.3.2.

3.3.1 Two-peaks representations

These data consist of the average smoothed gait cycles, hence the acceleration

curves are characterised by the presence of two peaks corresponding to the two

diagonals. All the three components of the acceleration vector (i.e. vertical,

transversal and longitudinal) are considered. Positive accelerations for the three

axes are represented by dorsal, left and cranial directions, respectively.

Original Datasets

In these datasets the acceleration curves are given by the functions of time

{aori (t)}i=1,...,n, t ∈ [0, 1], which are cut out such that the stride starts in the

suspension phase before the stance phase of the right diagonal.

The three Original Datasets are:

• VERTICAL_Original Dataset: vertical component of the 3D accelera-

tions. The first positive peak is associated with the ground reaction force of

the RF-LH diagonal, whereas the second positive peak corresponds to the

LF-RH diagonal.

Page 56: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

36 CHAPTER 3. DATASET

• TRANSVERSAL_Original Dataset: transversal component of the 3D

accelerations. The first peak is associated with the stance phase of the RF-LH

diagonal, whereas the second peak corresponds to the LF-RH diagonal.

• LONGITUDINAL_Original Dataset: longitudinal component of the 3D

accelerations. The first peak is associated with the stance phase of the RF-LH

diagonal, whereas the second peak corresponds to the LF-RH diagonal.

Modified Datasets

The acceleration functions of the Original Datasets are modified such that the

curves {amodi (t)}i=1,...,n, t ∈ [0, 1] start in the suspension phase before the stance

phase of the sound diagonal. In particular, when the lame limb is the right-fore or

the left-hind, the two halves of the original acceleration curves are swapped.

The three Modified Datasets are:

• VERTICAL_Modified Dataset: vertical component of the modified 3D

accelerations. The first positive peak is associated with the ground reaction

force with the sound diagonal, whereas the second positive peak corresponds

to the lame diagonal.

• TRANSVERSAL_Modified Dataset: transversal component of the

modified 3D accelerations. The first peak is associated with the stance

phase of the sound diagonal, whereas the second peak corresponds to the

lame diagonal.

• LONGITUDINAL_Modified Dataset: longitudinal component of the

modified 3D accelerations. The first peak is associated with the stance phase

of the sound diagonal, whereas the second peak corresponds to the lame

diagonal.

A graphical comparison of the Original and Modified datasets is showed in

Figure 3.1. Transversal accelerations (second row) show a particular feature which

is not present in vertical and longitudinal accelerations: a trotting horse lateral

movements are symmetrical in the two diagonals with respect to the craniocaudal

axis. This translates into a symmetry of the two peaks of the acceleration functions

with respect to the 0-acceleration axis. This fact has to be taken into account in the

Page 57: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

3.3. DIFFERENT REPRESENTATIONS OF DATA 37

construction of the TRANSVERSAL Modified Dataset: in addition to the swapping

operation, the exchanged peaks have to be reflected across the 0-acceleration axis.

Another important aspect to point out is that these data are clearly non

Gaussian: this strongly limits the application parametric methods for inference, in

favour of non-parametric techniques.

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Original Vertical Accelerations

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Modified Vertical Accelerations

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Original Transversal Accelerations

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2Modified Transversal Accelerations

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Original Longitudinal Accelerations

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Modified Longitudinal Accelerations

Figure 3.1: Comparison between Original (left column) and Modified (right column)Datasets. The curves are colored according to the lame limb: No, RH, RF, LH, LF. Lowdegrees of lameness are indicated with lighter tones, moderate degrees with darker ones.

3.3.2 Difference between peaks representations

These data are obtained from the datasets introduced in Subsection 3.3.1 by

subtracting the two parts of the curves representing the two diagonals. The results

Page 58: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

38 CHAPTER 3. DATASET

of the analysis of these datasets will be presented in Appendices A and B.

Original Peak1-Peak2 Datasets

The data are given by the functions of time {∆aori (t)}i=1,...,n, t ∈ [0, 1] such that:

∆aori (t) = aori (t)− aori(t+

1

2

)t ∈[0,

1

2

]Note that for a sound horse the difference between the two peaks of acceleration

curves is almost null, due to the symmetry of the movements he performs.

The three Original Peak1-Peak2 Datasets are:

• VERTICAL_Original Peak1-Peak2 Dataset: difference between the

first peak (RF-LH diagonal) and the second peak (LF-RH diagonal) of the

vertical component of the 3D accelerations.

• TRANSVERSAL_Original Peak1-Peak2 Dataset: difference between

the first peak (RF-LH diagonal) and the second peak (LF-RH diagonal) of

the transversal component of the 3D accelerations.

• LONGITUDINAL_Original Peak1-Peak2 Dataset: difference between

the first peak (RF-LH diagonal) and the second peak (LF-RH diagonal) of

the longitudinal component of the 3D accelerations.

Modified Peak1-Peak2 Datasets

The data are given by the functions of time {∆amodi (t)}i=1,...,n, t ∈ [0, 1] such that:

∆amodi (t) = amodi (t)− amodi

(t+

1

2

)t ∈[0,

1

2

]The three Modified Peak1-Peak2 Datasets are:

• VERTICAL_Modified Peak1-Peak2 Dataset: difference between the

first peak (sound diagonal) and the second peak (lame diagonal) of the vertical

component of the 3D accelerations.

• TRANSVERSAL_Modified Peak1-Peak2 Dataset: difference between

the first peak (sound diagonal) and the second peak (lame diagonal) of the

transversal component of the 3D accelerations.

Page 59: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

3.3. DIFFERENT REPRESENTATIONS OF DATA 39

• LONGITUDINAL_Modified Peak1-Peak2 Dataset: difference between

the first peak (sound diagonal) and the second peak (lame diagonal) of the

longitudinal component of the 3D accelerations.

A graphical comparison of the Original and Modified Peak1-Peak2 datasets is

showed in Figure 3.2.

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.5

1.0

1.5

Original Vertical Peak1−Peak2

0.0 0.1 0.2 0.3 0.4 0.5−

1.5

−0.

50.

51.

01.

5

Modified Vertical Peak1−Peak2

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Original Transversal Peak1−Peak2

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Modified Transversal Peak1−Peak2

0.0 0.1 0.2 0.3 0.4 0.5

−6

−4

−2

02

46

Original Longitudinal Peak1−Peak2

0.0 0.1 0.2 0.3 0.4 0.5

−6

−4

−2

02

46

Modified Longitudinal Peak1−Peak2

Figure 3.2: Comparison between Original (left column) and Modified (right column)Peak1-Peak2 Datasets. The curves are colored according to the lame limb: No, RH, RF,LH, LF. Low degrees of lameness are indicated with lighter tones, moderate degrees withdarker ones.

Page 60: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

40 CHAPTER 3. DATASET

3.4 Covariates

Independently by the chosen representation of the data, some categorical vari-

ables are associated to each curve:

• horse: B1, B2, B3, B4, B5, B6, B7, B8

Horse ID: each horse is measured 9 times, except for horse B3 which has 2

missing observations (relative to lameLeg RH).

• lameLeg: No, RH, RF, LH, LF

Lame limb: “No” indicates no lameness (i.e. sound horse), “RH” right-hind

limb, “RF” right-fore limb, “LH” left-hind limb, “LF” left-fore limb.

• lameSide: No, Right, Left

• lameForeHind: No, Hind, Fore

• lameDegree: No, Low, Mod

Degrees of the mechanically induced lameness: “No” indicates that no lameness

is induced, “Low” stands for low degree and “Mod” for moderate degree of

lameness.

In Table 3.1, variables related to all the nine measurements of the horse B1 are

presented. This is valid also for all the other horses participating to the experiment,

except for horse B3, whose data relative to the right-hind limb could not be recorded.

Table 3.1: Categorical variables relative to horse B1

horse lameLeg lameSide lameForeHind lameDegree

B1 No No No NoB1 RH Right Hind LowB1 RH Right Hind ModB1 RF Right Fore LowB1 RF Right Fore ModB1 LH Left Hind LowB1 LH Left Hind ModB1 LF Left Fore LowB1 LF Left Fore Mod

Page 61: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

3.4. COVARIATES 41

3.4.1 lameLeg and lameForeHind

As confirmed in literature, a sound horse moves symmetrically (up to random

variation) during trot in the sense that the accelerations of the trunk are the same

for the two parts of the gait cycle (black curves of Figures 3.3 and 3.4). On the

contrary, lameness is believed to disturb the gait pattern, leading to an asymmetry

between the two parts of the stride. Specifically, the horse attempts to “unload”

the lame limb during the weight-bearing phase of the stride through compensatory

movements of head and trunk. This causes maximal acceleration and acceleration

amplitude to decrease during the stance phase of the lame limb and to increase

during the stance phase of the contralateral nonlame limb. This is very evident in

our data. If we consider the Original Datasets (Figure 3.3) one can note that when

the lameness is induced in the right-fore or the left-hind limb (violet and orange

curves), the first peak resulting from the stance phase of the right diagonal is lower

than the second peak. The opposite situation arises during the stance phase of the

left diagonal (blue and green curves).

The definition of the Modified Datasets implies that the first peak is always

referred to the sound diagonal and as a result it is always higher or equal to the second

peak. It should be noticed that in the modified acceleration curves the information of

the lameSide is lost due to the peak-swapping procedure. Consequently a distinction

can be made only among levels of the factor lameForeHind (see Figure 3.4).

The two categorical variables lameLeg and lameForeHind are introduced as fixed

effects in our models for the original and modified accelerations, respectively. In

fact, we are interested in studying the effects of the induced lameness on the shape

of acceleration functions. This problem sets in the Functional Analysis of Variance

(FANOVA) framework presented in Subsection 2.2.3.

3.4.2 lameDegree

The degree of lameness induced in a limb is an important aspect to take into

account because the more the lameness is mild, the more the visual diagnosis

becomes difficult. The distinction between low and moderate degrees of lameness is

represented in Figures 3.3 and 3.4 by using lighter or darker tones of the same color.

Anyway, this variable cannot be included in our models as a second fixed effect,

since the factors lameDegree - lameLeg and lameDegree - lameForeHind are not

Page 62: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

42 CHAPTER 3. DATASET

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−6

−2

26

0.0 0.2 0.4 0.6 0.8 1.0

−6

−2

26

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−6

−2

26

0.0 0.2 0.4 0.6 0.8 1.0

−6

−2

26

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−6

−2

26

0.0 0.2 0.4 0.6 0.8 1.0

−6

−2

26

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−6

−2

26

0.0 0.2 0.4 0.6 0.8 1.0

−6

−2

26

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−6

−2

26

0.0 0.2 0.4 0.6 0.8 1.0

−6

−2

26

Figure 3.3: Representation of the groups induced by the factor lameLeg on the VerticalOriginal accelerations (left column), on the Transversal Original accelerations (centralcolumn) and on the Longitudinal Original accelerations (right column). In each row,acceleration curves relative to one of the levels of the factor lameLeg are colored, while allthe other curves are represented in gray. Colors associated to lameLeg levels are: No, RH,RF, LH, LF. Darker colors (of the same tone) are used to indicate a moderate lamenessdegree, while lighter colors indicate a low lameness degree.

Page 63: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

3.4. COVARIATES 43

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Figure 3.4: Representation of the groups induced by the factor lameForeHind on theVertical Modified accelerations (left column), on the Transversal Modified accelerations(central column) and on the Longitudinal Modified accelerations (right column). In eachrow, acceleration curves relative to one of the levels of the factor lameForeHind are colored,while all the other curves are represented in gray. Colors associated to lameForeHind levelsare: No, Hind, Fore. Darker colors (of the same tone) are used to indicate a moderatelameness degree, while lighter colors indicate a low lameness degree.

crossed (i.e. there is not at least one observation in every combination of categories

for the two factors).

What can be done is to construct new variables containing the information com-

ing from both the factors of the above mentioned couples. The factors lameDegree

- lameForeHind give birth to the new factor:

• lameForeHind_Degree: No, Hind_low, Hind_mod, Fore_low, Fore_mod

In practice, the couple lameDegree - lameLeg is not considered, since the presence of

nine groups would not allow the application of the permutation procedures described

in the previous Chapter, in particular the ones based on restricted permutations.

3.4.3 horse

A noteworthy feature of our data is that there are multiple observations from

the same horse. Every horse has a slightly different gait, and this is going to be

Page 64: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

44 CHAPTER 3. DATASET

an idiosyncratic factor that affects all signals from the same horse, thus rendering

these different signals inter-dependent rather than independent. This fact is clearly

visible in Figure 3.5, where curves relative to a single horse are represented in the

each panel.

To deal with this problem the variable horse is treated as a random effect,

associated with a sample randomly drawn from a population. This approach allows

to model correlations between observations over the same “subject” which is typical,

for example, for longitudinal and repeated measurements data. In particular, by

introducing a random intercept, we are able to characterise the variation induced

in the response by the different levels of the covariate (Abramovich and Angelini,

2006).

Page 65: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

3.4. COVARIATES 45

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Horse B1

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Horse B2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Horse B3

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Horse B4

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Horse B5

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Horse B6

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Horse B7

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Horse B8

Figure 3.5: Vertical Original accelerations of the eight horses involved in the experiment.In each panel all the curves relative to one horse are colored, while all the others arerepresented in gray. Acceleration curves are colored according to the levels of the factorlameLeg: No, RH, RF, LH, LF. Darker colors (of the same tone) are used to indicate amoderate lameness degree, while lighter colors indicate a low lameness degree. Note thatfor horse B3 two signals are missing (blue curves).

Page 66: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 67: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Chapter 4

Results of test for the fixed effect

In this Chapter, the results relative to tests for significance of the fixed effect

are presented. All the tests have been performed as described in Section 2.3,

considering both linear and linear mixed models and both unrestricted and restricted

permutation of residuals. In Table 4.1 there is a summary of the four different

approaches used to test fixed effects.

Table 4.1: Methods to test fixed effects.

Model Permutations

Linear Model (LM) UnrestrictedRestricted

Linear Mixed Model (LMM) UnrestrictedRestricted

In addition to that we also investigate the differences between the accelerations

curves associated to different levels of the fixed effect, in a pairwise perspective. This

test detects significant differences between all pairs of lameLeg or lameForeHind

or lameForeHind_Degree levels. Furthermore, it is able to identify the regions of

the domain which contribute to the rejection of the null hypothesis thanks to the

application of the same IWT procedure as above.

From the analysis carried out with the aforementioned four types of test, we

will see that not taking into account the presence of the random effect either in

the model or in the permutations will translate into lower sensitivity in detecting

parts of the domain where significant differences between groups are present. As a

consequence the Unrestricted - LM test will prove to be less powerful than the other

47

Page 68: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

48 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

tests. Since the three tests that do consider the presence of the random effect behave

similarly, only the graphical results of the Restricted - LM test will be provided for

the pairwise comparisons. This test is much more computationally efficient than

the tests based on the Linear Mixed Model, whose fitting for each permutation

requires a long time. All the tests are performed choosing two significance levels:

1% (dark gray bands) and 5% (light gray bands). For simplicity of exposition the

comments are based on the results obtained with a significance level of α = 5%,

which is the most commonly used level in statistical analysis.

The results of the Original and Modified Datasets (two peaks representations)

are discussed in the following Sections. As concerns the Original and Modified

Peak1-Peak2 Datasets, their analysis is reported in Appendix A.

Page 69: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.1 Results of the Original Datasets with fixed ef-

fect lameLeg

4.1.1 VERTICAL Original Dataset

Fixed Effect: lameLeg (No, RH, RF, LH, LF)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Model

aV ERTorig (t) = µ(t) + lameLegg(t) + εig(t) (4.1)

Linear Mixed Model

aV ERTorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t) (4.2)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameLeg, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

TestH0 : lameLegg(t) = 0 ∀g ∈ {1, ..., 5}, ∀t ∈ [0, 1]

H1 : lameLegg(t) 6= 0 for some g ∈ {1, ..., 5} and some t ∈ [0, 1](4.3)

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

49

Page 70: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

50 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

Results

From Figure 4.1 it can be noted that each of the four types of test detects a

significant effect in the positive peaks of the vertical acceleration functions and also

in parts of the domain before the positive peaks. This corresponds approximately

to the phase of landing, followed by the hoof contact with the ground of the right

fore and left hindlimb for the first positive peak, and of the left fore and right

hindlimb for the second one.

Figure 4.2 gives further details on the reasons that have led to the rejection of

the null hypothesis, comparing two levels of the fixed effect lameLeg at a time. In

the first row the level “No” (sound horse) is compared to all the other levels: in all

the panels the IWT procedure finds differences in the peak relative to the stance

phase of the lame diagonal (first peak for RF and LH, second peak for LF and

RH) and in a time interval before the maximum acceleration of the sound diagonal

(second peak for RF and LH, first peak for LF and RH). This means that, with

respect to a sound horse, lameness influences the vertical acceleration of the trunk

not only when the lame limb strikes the ground, but also during the landing of the

sound diagonal. This is due to compensatory movements of the horse, which aims

at the reduction of the loading on the painful leg through abnormal movement of a

body part (head nod or pelvic hike), weight shifting (to the contralateral or diagonal

limb or torso), change in joint angles (lack of fetlock extension), and alterations in

foot flight (Adams and Stashak’s, 2011).

When comparing the levels of lameLeg belonging to the same diagonal, i.e.

RF-LH and LF-RH, we can see that most of the differences are detected in the part

of the stride relative to the sound diagonal (second part for RF-LH and first part

for LF-RH). Great differences are also found when comparing lame limb belonging

to different diagonals, both in the case of lame limbs on the same side (fore-hind

comparisons) and in the case of lame forelimbs or hindlimbs (right-left comparisons).

Page 71: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.1. RESULTS OF THE ORIGINAL DATASETS 51

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: unrestricted − LM

Ver

tical

Acc

eler

atio

ns

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: restricted − LM

Ver

tical

Acc

eler

atio

ns

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: unrestricted − LMM

Ver

tical

Acc

eler

atio

ns

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: restricted − LMM

Ver

tical

Acc

eler

atio

ns

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure 4.1: (a) Results of the four different tests for significance of the fixed effectlameLeg in the Vertical Original Dataset: regions presenting p-value ≤ 1% are representedin dark gray, p-value ≤ 5% in light gray. Acceleration curves are colored depending onthe levels of the factor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameLeg in the Vertical Original Dataset. The two red lines represent the thresholds 0.01and 0.05.

Page 72: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

52 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

RH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

RF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

No−RH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−RH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

No−RF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−RF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

No−LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−LH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

No−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−LF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

RH−RF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RH−RF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

RH−LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RH−LH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

RH−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RH−LF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

RF−LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RF−LH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

RF−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RF−LF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

LH−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

LH−LF

X

p−va

lue

Figure 4.2: Results of the restricted - LM pairwise test for significance of the fixedeffect lameLeg in the Vertical Original Dataset. Diagonal: plots of the functional data ofeach group, all the other data are represented in gray. Superior diagonal: means of eachpairwise comparison, and regions presenting a significant difference controlling the IWERat 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal: p-value (dashed line)and adjusted p-value (solid line) functions associated to the pairwise differences betweenthe vertical accelerations of the five group representing the lame limb.

Page 73: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.1. RESULTS OF THE ORIGINAL DATASETS 53

4.1.2 TRANSVERSAL Original Dataset

Fixed Effect: lameLeg (No, RH, RF, LH, LF)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Model

aTRANSorig (t) = µ(t) + lameLegg(t) + εig(t) (4.4)

Linear Mixed Model

aTRANSorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t) (4.5)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameLeg, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

Test H0 : lameLegg(t) = 0 ∀g ∈ {1, ..., 5}, ∀t ∈ [0, 1]

H1 : lameLegg(t) 6= 0 for some g ∈ {1, ..., 5} and some t ∈ [0, 1]

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

Results

Looking at Figure 4.3 we note that the factor lameLeg is considered significant

for the model of transversal accelerations in almost the whole the domain, excluding

the regions where the highest (in absolute value) peaks are present.

Page 74: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

54 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

Observing in detail Figure 4.4, we note that the results are very noisy, in fact

several intervals are highlighted in many comparisons. This is probably due to the

high variability of the data themselves, and has to be considered when discussing

the results. The adjusted p-value in the IWT procedure is defined in such a way

that given any interval of the domain where the null hypothesis is not violated, the

probability of wrongly selecting it as significant is controlled. Consequently, when

a great number of intervals is found, there is a real possibility of having selected

some of them incorrectly.

One of the first things to notice is that, when lameness affects one of the

hindlimbs, it appears to have no effect on the transversal acceleration signals: in

panels No - RH, No - LH and RH - LH no gray bands are present. In all the other

panels differences in both shift and amplitude of the peaks are detected.

Page 75: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.1. RESULTS OF THE ORIGINAL DATASETS 55

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test fixed effect: unrestricted − LM

Tran

sver

sal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test fixed effect: restricted − LM

Tran

sver

sal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test fixed effect: unrestricted − LMM

Tran

sver

sal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test fixed effect: restricted − LMM

Tran

sver

sal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure 4.3: (a) Results of the four different tests for significance of the fixed effectlameLeg in the Transversal Original Dataset: regions presenting p-value ≤ 1% arerepresented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameLeg in the Transversal Original Dataset. The two red lines represent the thresholds0.01 and 0.05.

Page 76: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

56 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

RH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

RF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

No−RH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−RH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

No−RF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−RF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

No−LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−LH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

No−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−LF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

RH−RF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RH−RF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

RH−LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RH−LH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

RH−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RH−LF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

RF−LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RF−LH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

RF−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RF−LF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

LH−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

LH−LF

X

p−va

lue

Figure 4.4: Results of the restricted - LM pairwise test for significance of the fixed effectlameLeg in the Transversal Original Dataset. Diagonal: plots of the functional data ofeach group, all the other data are represented in gray. Superior diagonal: means of eachpairwise comparison, and regions presenting a significant difference controlling the IWERat 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal: p-value (dashed line)and adjusted p-value (solid line) functions associated to the pairwise differences betweenthe vertical accelerations of the five group representing the lame limb.

Page 77: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.1. RESULTS OF THE ORIGINAL DATASETS 57

4.1.3 LONGITUDINAL Original Dataset

Fixed Effect: lameLeg (No, RH, RF, LH, LF)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Model

aLONGorig (t) = µ(t) + lameLegg(t) + εig(t) (4.6)

Linear Mixed Model

aLONGorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t) (4.7)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameLeg, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

Test H0 : lameLegg(t) = 0 ∀g ∈ {1, ..., 5}, ∀t ∈ [0, 1]

H1 : lameLegg(t) 6= 0 for some g ∈ {1, ..., 5} and some t ∈ [0, 1]

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

Results

Similarly to the case of transversal accelerations, effects of hindlimb lamenesses

are not detected in longitudinal signals: see panels No - RH, No - LH and RH - LH

of Figure 4.6. On the contrary, the presence of a lame limb in one of the forelegs

affects the shape of longitudinal acceleration curves, modifying mostly the peak

Page 78: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

58 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

relative to the stance phase of the lame diagonal. According to that, in panels No -

RF and No - LF the presence of gray bands is concentrated in the first half and in

the second half of the stride, respectively. Also an interval preceding the negative

peak of the sound diagonal is selected: in both cases the colored curves are slightly

shifted to the left, which is interpretable as an attempt to anticipate the stance

phase of the sound limbs pair in order to unload the painful leg. Comparing the

two groups corresponding to the forelimbs (RF - LF) many intervals are selected

and here it is easy to note that swapping the two halves of one of the two curves,

the resulting would be very similar to the other one: this is what happens in the

construction of the Modified Datasets, in which the information on the lame side is

lost during the swapping process. When considering the comparison between a fore

and a hindlimb we note that the longitudinal accelerations relative to hindlimbs

lameness (blue and orange curves) are almost null (constant velocity) after the

positive peak of the lame diagonal and before the negative peak of the healty

diagonal. On the contrary in violet and green curves we can see that there is a

more gradual decrease of the acceleration between the two peaks.

Page 79: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.1. RESULTS OF THE ORIGINAL DATASETS 59

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: unrestricted − LM

Long

itudi

nal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: restricted − LM

Long

itudi

nal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: unrestricted − LMM

Long

itudi

nal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: restricted − LMM

Long

itudi

nal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure 4.5: (a) Results of the four different tests for significance of the fixed effectlameLeg in the Longitudinal Original Dataset: regions presenting p-value ≤ 1% arerepresented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameLeg in the Longitudinal Original Dataset. The two red lines represent the thresholds0.01 and 0.05.

Page 80: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

60 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

RH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

RF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

No−RH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−RH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

No−RF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−RF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

No−LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−LH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

No−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−LF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

RH−RF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RH−RF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

RH−LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RH−LH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

RH−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RH−LF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

RF−LH

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RF−LH

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

RF−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

RF−LF

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

LH−LF

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

LH−LF

X

p−va

lue

Figure 4.6: Results of the restricted - LM pairwise test for significance of the fixed effectlameLeg in the Longitudinal Original Dataset. Diagonal: plots of the functional data ofeach group, all the other data are represented in gray. Superior diagonal: means of eachpairwise comparison, and regions presenting a significant difference controlling the IWERat 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal: p-value (dashed line)and adjusted p-value (solid line) functions associated to the pairwise differences betweenthe vertical accelerations of the five group representing the lame limb.

Page 81: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.2 Results of the Modified Datasets with fixed ef-

fect lameForeHind

As anticipated in Subsection 3.4.1, the information of the lame side is lost due to

the swapping operation performed during the construction of the Modified Datasets.

This fact was confirmed by pairwise tests to compare levels RF-LF and RH-LH,

which detected no significant differences between the acceleration curves belonging

to these groups at a significance level of 5%. Consequently, the analyses presented

in this Section consider as fixed effect the factor lameForeHind.

4.2.1 VERTICAL Modified Dataset

Fixed Effect: lameForeHind (No, Hind, Fore)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Model

aV ERTmodig (t) = µ(t) + lameForeHindg(t) + εig(t) (4.8)

Linear Mixed Model

aV ERTmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t) (4.9)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind, g = 1, 2, 3;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

TestH0 : lameForeHindg(t) = 0 ∀g ∈ {1, 2, 3}, ∀t ∈ [0, 1]

H1 : lameForeHindg(t) 6= 0 for some g ∈ {1, 2, 3} and some t ∈ [0, 1]

(4.10)

61

Page 82: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

62 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

Results

Figure 4.7 shows how the effect of the factor lameForeHind is significant in most

part of the domain, except for the two negative peaks.

In Figure 4.8 pairwise comparison are presented. As in the case of the Vertical

Original Dataset, differences with curves of sound horses (first row) are detected

mostly in the stance phase of the lame diagonal (second peak), where the vertical

accelerations of lame horses are lessened with respect to the ones associated to

healty horses. As regards the level “Fore”, we can note that the vertical accelerations

curves are (on average) lower than the accelerations of the level “Hind” in the first

peak (sound diagonal), while the second peak (lame diagonal) seems to be slightly

shifted to the right with respect to the corresponding peak of both level “Hind” and

“No”. This shift of the second peak with respect to curves of a sound horse is also

present, even if less emphasised, when the lameness is induced in a hindlimb. The

rationale is that the horse seeks to minimize the pressure on the painful limb by a

faster change of weight to the healthy diagonal. This corresponds to a delay in the

part of the signal associated with the lame diagonal (i.e. the second peak) and it is

consistent with results found by Sørensen et al., 2012.

Page 83: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.2. RESULTS OF THE MODIFIED DATASETS 63

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: unrestricted − LM

Ver

tical

Acc

eler

atio

ns

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: restricted − LM

Ver

tical

Acc

eler

atio

ns

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: unrestricted − LMM

Ver

tical

Acc

eler

atio

ns

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: restricted − LMM

Ver

tical

Acc

eler

atio

ns

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure 4.7: (a) Results of the four different tests for significance of the fixed effectlameForeHind in the Vertical Modified Dataset: regions presenting p-value ≤ 1% arerepresented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the four different tests for significance of the fixedeffect lameForeHind in the Vertical Modified Dataset. The two red lines represent thethresholds 0.01 and 0.05.

Page 84: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

64 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Hind

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Fore

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

No−Hind

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−Hind

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

No−Fore

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−Fore

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Hind−Fore

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind−Fore

X

p−va

lue

Figure 4.8: Results of the restricted - LM pairwise test for significance of the fixed effectlameForeHind in the Vertical Modified Dataset. Diagonal: plots of the functional dataof each group, all the other data are represented in gray. Superior diagonal: means of eachpairwise comparison, and regions presenting a significant difference controlling the IWERat 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal: p-value (dashed line)and adjusted p-value (solid line) functions associated to the pairwise differences betweenthe vertical accelerations of the five group representing the lame limb.

Page 85: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.2. RESULTS OF THE MODIFIED DATASETS 65

4.2.2 TRANSVERSAL Modified Dataset

Fixed Effect: lameForeHind (No, Hind, Fore)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Model

aTRANSmodig (t) = µ(t) + lameForeHindg(t) + εig(t) (4.11)

Linear Mixed Model

aTRANSmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t) (4.12)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind, g = 1, 2, 3;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

TestH0 : lameForeHindg(t) = 0 ∀g ∈ {1, 2, 3}, ∀t ∈ [0, 1]

H1 : lameForeHindg(t) 6= 0 for some g ∈ {1, 2, 3} and some t ∈ [0, 1]

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

Results

Results shown in Figure 4.9 and Figure 4.10 are consistent with what has

previously been found in the case of Transversal Original Dataset.

Page 86: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

66 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2Test fixed effect: unrestricted − LM

Tran

sver

sal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test fixed effect: restricted − LM

Tran

sver

sal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test fixed effect: unrestricted − LMM

Tran

sver

sal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test fixed effect: restricted − LMM

Tran

sver

sal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure 4.9: (a) Results of the four different tests for significance of the fixed effectlameForeHind in the Transversal Modified Dataset: regions presenting p-value ≤ 1%are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameForeHind in the Transversal Modified Dataset. The two red lines represent thethresholds 0.01 and 0.05.

Page 87: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.2. RESULTS OF THE MODIFIED DATASETS 67

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Hind

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Fore

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

No−Hind

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−Hind

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

No−Fore

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−Fore

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Hind−Fore

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind−Fore

X

p−va

lue

Figure 4.10: Results of the restricted - LM pairwise test for significance of the fixed effectlameForeHind in the Transversal Modified Dataset. Diagonal: plots of the functionaldata of each group, all the other data are represented in gray. Superior diagonal: meansof each pairwise comparison, and regions presenting a significant difference controllingthe IWER at 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal: p-value (dashed line) and adjusted p-value (solid line) functions associated to the pairwisedifferences between the vertical accelerations of the five group representing the lame limb.

Page 88: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

68 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

4.2.3 LONGITUDINAL Modified Dataset

Fixed Effect: lameForeHind (No, Hind, Fore)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Model

aLONGmodig (t) = µ(t) + lameForeHindg(t) + εig(t) (4.13)

Linear Mixed Model

aLONGmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t) (4.14)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind, g = 1, 2, 3;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

TestH0 : lameForeHindg(t) = 0 ∀g ∈ {1, 2, 3}, ∀t ∈ [0, 1]

H1 : lameForeHindg(t) 6= 0 for some g ∈ {1, 2, 3} and some t ∈ [0, 1]

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

Results

The null hypothesis of no lameForeHind effect on longitudinal accelerations is

rejected in the first part of the stance phase of the sound diagonal and in all the

second half of the gait cycle (Figure 4.11).

Page 89: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.2. RESULTS OF THE MODIFIED DATASETS 69

As in the vertical case, even in the longitudinal component it can be noted

that when the horse is affected by forelimb or hindlimb lameness, the positive

and negative peaks of the second half of the stride changes with respect to the

nonlame mean curve (first row of Figure 4.12). In particular the amplitude of the

peaks decreases and their position is shifted to the right. This is more noticeable

in the case of forelimb lameness, where also the first couple of peaks tends to be

anticipated. In general the presence of a lame forelimb seems to have a larger

impact on the acceleration signals and our tests are able to highlight the intervals

where these effects are more evident.

Page 90: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

70 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: unrestricted − LMLo

ngitu

dina

l Acc

eler

atio

ns

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: restricted − LM

Long

itudi

nal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: unrestricted − LMM

Long

itudi

nal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: restricted − LMM

Long

itudi

nal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure 4.11: (a) Results of the four different tests for significance of the fixed effectlameForeHind in the Longitudinal Modified Dataset: regions presenting p-value ≤ 1%are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameForeHind in the Longitudinal Modified Dataset. The two red lines represent thethresholds 0.01 and 0.05.

Page 91: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.2. RESULTS OF THE MODIFIED DATASETS 71

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Hind

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Fore

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

No−Hind

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−Hind

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

No−Fore

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

No−Fore

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Hind−Fore

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind−Fore

X

p−va

lue

Figure 4.12: Results of the restricted - LM pairwise test for significance of the fixed effectlameForeHind in the Longitudinal Modified Dataset. Diagonal: plots of the functionaldata of each group, all the other data are represented in gray. Superior diagonal: meansof each pairwise comparison, and regions presenting a significant difference controllingthe IWER at 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal: p-value (dashed line) and adjusted p-value (solid line) functions associated to the pairwisedifferences between the vertical accelerations of the five group representing the lame limb.

Page 92: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

72 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

4.3 Results of the Modified Datasets with fixed ef-

fect lameForeHind_Degree

In this Section we examine the significance of the factor lameForeHind_Degree,

which introduces the distinction between two degrees of induced lameness. This

further information carried by the factor lameDegree can be considered only in

the analysis of Modified Datasets. In fact in the Original Datasets this additional

information would make the permutational procedure impossible to apply because

of the reduction of the number of permutable observations.

4.3.1 VERTICAL Modified Dataset

Fixed Effect: lameForeHind_Degree (No, Hind_low, Hind_mod, Fore_low, Fore_mod)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Model

aV ERTmodig (t) = µ(t) + lameForeHind_Degreeg(t) + εig(t) (4.15)

Linear Mixed Model

aV ERTmodijg (t) = µ(t) + lameForeHind_Degreeg(t) + horsej(t) + εijg(t) (4.16)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind_Degree, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

TestH0 : lameForeHind_Degreeg(t) = 0 ∀g ∈ {1, ..., 5}, ∀t ∈ [0, 1]

H1 : lameForeHind_Degreeg(t) 6= 0 for some g ∈ {1, ..., 5} and some t ∈ [0, 1]

(4.17)

Page 93: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.3. RESULTS OF THE MODIFIED DATASETS 73

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

Results

The fixed effect lameForeHind_Degree appears to be significant in the initial

part of the first half of the stride (sound diagonal) and in all the second half (lame

diagonal).

During trotting the horse is expected to modify the pressure on the lame limb

pair, in particular to diminish it with respect to the pressure the healthy limb pair,

in a way that depends on the degree of lameness. The extreme case happens when

lameness is so severe that the affected limb is completely unable to bear weight.

Analysing Figure 4.14 we expect to see a confirmation of this fact in a reduction

of the peak height and in a more evident shifting to the right of the second peak

at increasing lameness degree. Actually, this is what happens in the comparison

Fore_low - Fore_mod, while no difference is detected between the groups Hind_low

- Hind_mod. The inability to distinguish the low from the moderate lameness

degree in the hindlimbs might be caused by the position of the accelerometer, which

is placed at the lowest point of the back in the midline (above T13) near the head.

For this reason, compensatory movements of the caudal part of the trunk (which

are more consistent in hindlimb lameness) are not fully captured by the sensor.

Considering the fifth column of Figure 4.14, we can see that the higher the

lameness degree is, the lower the second peak of the signal and the more right

shifted becomes with respect to the baseline signal coming from sound horses.

Another fact to point out is that the first peak of the acceleration curves tends to

be slightly left shifted, in a more manifest way for moderate lameness degrees. This

means that with growing level of pain the horse tries both to retard the stance

phase of the injured leg and to anticipate the stance phase of the sound limb pair.

As we expected, differences in all the comparison are more easily detectable when

lameness is more severe and affects one of the forelimbs.

Page 94: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

74 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: unrestricted − LMV

ertic

al A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: restricted − LM

Ver

tical

Acc

eler

atio

ns

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: unrestricted − LMM

Ver

tical

Acc

eler

atio

ns

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test fixed effect: restricted − LMM

Ver

tical

Acc

eler

atio

ns

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure 4.13: (a) Results of the four different tests for significance of the fixed effectlameForeHind_Degree in the Vertical Modified Dataset: regions presenting p-value≤ 1% are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curves arecolored depending on the levels of the factor lameForeHind_Degree: No, Fore_low,Fore_mod, Hind_low, Hind_mod.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameForeHind_Degree in the Vertical Modified Dataset. The two red lines representthe thresholds 0.01 and 0.05.

Page 95: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.3. RESULTS OF THE MODIFIED DATASETS 75

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Fore_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Fore_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Hind_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Fore_low−Fore_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Fore_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Fore_low−Hind_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_low

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Fore_low−Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Fore_low−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−No

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Fore_mod−Hind_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_low

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Fore_mod−Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Fore_mod−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−No

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Hind_low−Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−Hind_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Hind_low−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−No

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Hind_mod−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind_mod−No

X

p−va

lue

Figure 4.14: Results of the restricted - LM pairwise test for significance of the fixedeffect lameForeHind_Degree in the Vertical Modified Dataset. Diagonal: plots ofthe functional data of each group, all the other data are represented in gray. Superiordiagonal: means of each pairwise comparison, and regions presenting a significant differencecontrolling the IWER at 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal:p-value (dashed line) and adjusted p-value (solid line) functions associated to the pairwisedifferences between the vertical accelerations of the five group representing the lame limb.

Page 96: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

76 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

4.3.2 TRANSVERSAL Modified Dataset

Fixed Effect: lameForeHind_Degree (No, Hind_low, Hind_mod, Fore_low, Fore_mod)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Model

aTRANSmodig (t) = µ(t) + lameForeHind_Degreeg(t) + εig(t) (4.18)

Linear Mixed Model

aTRANSmodijg (t) = µ(t) + lameForeHind_Degreeg(t) + horsej(t) + εijg(t) (4.19)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind_Degree, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

TestH0 : lameForeHind_Degreeg(t) = 0 ∀g ∈ {1, ..., 5}, ∀t ∈ [0, 1]

H1 : lameForeHind_Degreeg(t) 6= 0 for some g ∈ {1, ..., 5} and some t ∈ [0, 1]

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

Results

In Figure 4.16 we can see that the obtained results are similar to the cases of

the factors lameLeg and lameForeHind. In particular the null hypothesis is not

rejected when comparing the groups of signals relative to lame hindlimbs with the

group of sound horses. Moreover, we note that the distinction between the low and

Page 97: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.3. RESULTS OF THE MODIFIED DATASETS 77

the moderate lameness degree in the forelimbs is not as marked as in the vertical

accelerations.

Page 98: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

78 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test fixed effect: unrestricted − LMTr

ansv

ersa

l Acc

eler

atio

ns

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test fixed effect: restricted − LM

Tran

sver

sal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test fixed effect: unrestricted − LMM

Tran

sver

sal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test fixed effect: restricted − LMM

Tran

sver

sal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure 4.15: (a) Results of the four different tests for significance of the fixed effectlameForeHind_Degree in the Transversal Modified Dataset: regions presenting p-value≤ 1% are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curves arecolored depending on the levels of the factor lameForeHind_Degree: No, Fore_low,Fore_mod, Hind_low, Hind_mod.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameForeHind_Degree in the Transversal Modified Dataset. The two red lines representthe thresholds 0.01 and 0.05.

Page 99: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.3. RESULTS OF THE MODIFIED DATASETS 79

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Fore_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Fore_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Hind_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Fore_low−Fore_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Fore_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Fore_low−Hind_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_low

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Fore_low−Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Fore_low−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−No

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Fore_mod−Hind_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_low

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Fore_mod−Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Fore_mod−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−No

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Hind_low−Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−Hind_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Hind_low−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−No

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Hind_mod−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind_mod−No

X

p−va

lue

Figure 4.16: Results of the restricted - LM pairwise test for significance of the fixedeffect lameForeHind_Degree in the Transversal Modified Dataset. Diagonal: plots ofthe functional data of each group, all the other data are represented in gray. Superiordiagonal: means of each pairwise comparison, and regions presenting a significant differencecontrolling the IWER at 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal:p-value (dashed line) and adjusted p-value (solid line) functions associated to the pairwisedifferences between the vertical accelerations of the five group representing the lame limb.

Page 100: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

80 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

4.3.3 LONGITUDINAL Modified Dataset

Fixed Effect: lameForeHind_Degree (No, Hind_low, Hind_mod, Fore_low, Fore_mod)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Model

aLONGmodig (t) = µ(t) + lameForeHind_Degreeg(t) + εig(t) (4.20)

Linear Mixed Model

aLONGmodijg (t) = µ(t) + lameForeHind_Degreeg(t) + horsej(t) + εijg(t) (4.21)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind_Degree, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

TestH0 : lameForeHind_Degreeg(t) = 0 ∀g ∈ {1, ..., 5}, ∀t ∈ [0, 1]

H1 : lameForeHind_Degreeg(t) 6= 0 for some g ∈ {1, ..., 5} and some t ∈ [0, 1]

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

Results

As we can see from Figure 4.17, the fixed effect lameForeHind_Degree is

significant mostly in the regions preceding the first negative peak, between the

second negative peak and the second positive one and following this last peak.

Page 101: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.3. RESULTS OF THE MODIFIED DATASETS 81

In Figure 4.18 we can observe that there are no differences between the two

lameness degrees induced in the hindlimbs. Confronting these two groups with the

sound one, at 5% level only a slight shift of the lame diagonal peak is detected

as significantly different with respect to the black curves. Instead the impact of

forelimbs lameness on the accelerations pattern is much more marked, especially in

all the part of the stride corresponding to the stance phase of the painful leg and

preceding the landing of the sound diagonal (see all the panels containing green

curves).

Page 102: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

82 CHAPTER 4. RESULTS OF TEST FOR THE FIXED EFFECT

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: unrestricted − LMLo

ngitu

dina

l Acc

eler

atio

ns

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: restricted − LM

Long

itudi

nal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: unrestricted − LMM

Long

itudi

nal A

ccel

erat

ions

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test fixed effect: restricted − LMM

Long

itudi

nal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure 4.17: (a) Results of the four different tests for significance of the fixed effectlameForeHind in the Longitudinal Modified Dataset: regions presenting p-value ≤ 1%are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameForeHind_Degree: No, Fore_low, Fore_mod,Hind_low, Hind_mod.(b) Adjusted p-value function of the four different tests for significance of the fixedeffect lameForeHind_Degree in the Longitudinal Modified Dataset. The two red linesrepresent the thresholds 0.01 and 0.05.

Page 103: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

4.3. RESULTS OF THE MODIFIED DATASETS 83

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Fore_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Fore_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Hind_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Fore_low−Fore_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Fore_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Fore_low−Hind_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_low

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Fore_low−Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Fore_low−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−No

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Fore_mod−Hind_low

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_low

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Fore_mod−Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Fore_mod−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−No

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Hind_low−Hind_mod

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−Hind_mod

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Hind_low−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−No

X

p−va

lue

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Hind_mod−No

X

Y

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Hind_mod−No

X

p−va

lue

Figure 4.18: Results of the restricted - LM pairwise test for significance of the fixedeffect lameForeHind_Degree in the Longitudinal Modified Dataset. Diagonal: plots ofthe functional data of each group, all the other data are represented in gray. Superiordiagonal: means of each pairwise comparison, and regions presenting a significant differencecontrolling the IWER at 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal:p-value (dashed line) and adjusted p-value (solid line) functions associated to the pairwisedifferences between the vertical accelerations of the five group representing the lame limb.

Page 104: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 105: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Chapter 5

Results of test for the random effect

In this Chapter, the results of tests for significance of the random effect are

presented. All the tests have been performed according to the procedure described

in Section 2.4.

Unlike the case of testing for fixed effect, here testing the difference between all

the pairs of horses would not provide interesting information. In fact, the obtained

results would not be generalizable because they would be referred to the particular

pair of horses taken into account. For this reason no such test has been done in

this case.

The results regarding the Original and Modified Peak1-Peak2 Datasets are

reported in Appendix B, while the analysis concerning the Original and Modified

Datasets (two peaks representations) is presented in the following Sections.

5.1 Comments

Test for significance of the random effect is an important step in the analysis

presented in this Thesis, since it validates the introduction of a variance component

depending on the horse ID in our LMM and the restriction of the set of all possible

permutations in the test for fixed effect procedures.

Initially, the choice of considering the horse as a random intercept was suggested

by the structure of the data and was supported by some graphical inspection of the

acceleration signals (e.g. Figure 3.5 on page 45). Now a formal confirmation that

our initial choice was correct is given by the results of our tests. In fact, in all our

LMMs the random effect is significant in almost the whole domain.

85

Page 106: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

86 CHAPTER 5. RESULTS OF THE ORIGINAL DATASETS

5.2 Results of the Original Datasets with fixed ef-

fect lameLeg

5.2.1 VERTICAL Original Dataset

Fixed Effect: lameLeg (No, RH, RF, LH, LF)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Mixed Model

aV ERTorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameLeg, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

Test H0 : σ2j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1]

(5.1)

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Page 107: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

87

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test random effect

Ver

tical

Acc

eler

atio

ns

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test Random Effect

Adj

uste

d p−

valu

e

(b)

Figure 5.1: (a) Results of the test for significance of the random effect horse in theVertical Original Dataset: regions presenting p-value ≤ 1% are represented in dark gray,p-value ≤ 5% in light gray. Acceleration curves are colored depending on the levels of thefactor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the test for significance of the random effect horse in theVertical Original Dataset. The two red lines represent the thresholds 0.01 and 0.05.

Page 108: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

88 CHAPTER 5. RESULTS OF THE ORIGINAL DATASETS

5.2.2 TRANSVERSAL Original Dataset

Fixed Effect: lameLeg (No, RH, RF, LH, LF)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Mixed Model

aTRANSorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameLeg, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

Test H0 : σ2j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1]

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Page 109: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

89

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test random effect

Tran

sver

sal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure 5.2: (a) Results of the test for significance of the random effect horse in theTransversal Original Dataset: regions presenting p-value ≤ 1% are represented in darkgray, p-value ≤ 5% in light gray. Acceleration curves are colored depending on the levelsof the factor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the test for significance of the random effect horse in theTransversal Original Dataset. The two red lines represent the thresholds 0.01 and 0.05.

Page 110: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

90 CHAPTER 5. RESULTS OF THE ORIGINAL DATASETS

5.2.3 LONGITUDINAL Original Dataset

Fixed Effect: lameLeg (No, RH, RF, LH, LF)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Mixed Model

aLONGorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameLeg, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

Test H0 : σ2j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1]

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Page 111: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

91

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test random effect

Long

itudi

nal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure 5.3: (a) Results of the test for significance of the random effect horse in theLongitudinal Original Dataset: regions presenting p-value ≤ 1% are represented in darkgray, p-value ≤ 5% in light gray. Acceleration curves are colored depending on the levelsof the factor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the test for significance of the random effect horse in theLongitudinal Original Dataset. The two red lines represent the thresholds 0.01 and 0.05.

Page 112: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

92 CHAPTER 5. RESULTS OF THE MODIFIED DATASETS

5.3 Results of the Modified Datasets with fixed ef-

fect lameForeHind

5.3.1 VERTICAL Modified Dataset

Fixed Effect: lameForeHind (No, Hind, Fore)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Mixed Model

aV ERTmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind, g = 1, 2, 3;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

Test H0 : σ2j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1]

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Page 113: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

93

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test random effect

Ver

tical

Acc

eler

atio

ns

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure 5.4: (a) Results of the test for significance of the random effect horse in theVertical Modified Dataset: regions presenting p-value ≤ 1% are represented in dark gray,p-value ≤ 5% in light gray. Acceleration curves are colored depending on the levels of thefactor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the test for significance of the random effect horse in theVertical Modified Dataset. The two red lines represent the thresholds 0.01 and 0.05.

Page 114: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

94 CHAPTER 5. RESULTS OF THE MODIFIED DATASETS

5.3.2 TRANSVERSAL Modified Dataset

Fixed Effect: lameForeHind (No, Hind, Fore)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Mixed Model

aTRANSmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind, g = 1, 2, 3;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

Test H0 : σ2j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1]

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Page 115: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

95

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test random effect

Tran

sver

sal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure 5.5: (a) Results of the test for significance of the random effect horse in theTransversal Modified Dataset: regions presenting p-value ≤ 1% are represented in darkgray, p-value ≤ 5% in light gray. Acceleration curves are colored depending on the levelsof the factor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the test for significance of the random effect horse in theTransversal Modified Dataset. The two red lines represent the thresholds 0.01 and 0.05.

Page 116: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

96 CHAPTER 5. RESULTS OF THE MODIFIED DATASETS

5.3.3 LONGITUDINAL Modified Dataset

Fixed Effect: lameForeHind (No, Hind, Fore)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Mixed Model

aLONGmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind, g = 1, 2, 3;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

Test H0 : σ2j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1]

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Page 117: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

97

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test random effect

Long

itudi

nal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure 5.6: (a) Results of the test for significance of the random effect horse in theLongitudinal Modified Dataset: regions presenting p-value ≤ 1% are represented in darkgray, p-value ≤ 5% in light gray. Acceleration curves are colored depending on the levelsof the factor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the test for significance of the random effect horse in theLongitudinal Modified Dataset. The two red lines represent the thresholds 0.01 and 0.05.

Page 118: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

98 CHAPTER 5. RESULTS OF THE MODIFIED DATASETS

5.4 Results of the Modified Datasets with fixed ef-

fect lameForeHind_Degree

5.4.1 VERTICAL Modified Dataset

Fixed Effect: lameForeHind_Degree (No, Hind_low, Hind_mod, Fore_low, Fore_mod)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Mixed Model

aV ERTmodijg (t) = µ(t) + lameForeHind_Degreeg(t) + horsej(t) + εijg(t)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind_Degree, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

Test H0 : σ2j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1]

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Page 119: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

99

0.0 0.2 0.4 0.6 0.8 1.0

−1

01

2

Test random effect

Ver

tical

Acc

eler

atio

ns

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure 5.7: (a) Results of the test for significance of the random effect horse in theVertical Modified Dataset: regions presenting p-value ≤ 1% are represented in dark gray,p-value ≤ 5% in light gray. Acceleration curves are colored depending on the levels of thefactor lameForeHind_Degree: No, Fore_low, Fore_mod, Hind_low, Hind_mod.(b) Adjusted p-value function of the test for significance of the random effect horse in theVertical Modified Dataset. The two red lines represent the thresholds 0.01 and 0.05.

Page 120: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

100 CHAPTER 5. RESULTS OF THE MODIFIED DATASETS

5.4.2 TRANSVERSAL Modified Dataset

Fixed Effect: lameForeHind_Degree (No, Hind_low, Hind_mod, Fore_low, Fore_mod)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Mixed Model

aTRANSmodijg (t) = µ(t) + lameForeHind_Degreeg(t) + horsej(t) + εijg(t)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind_Degree, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

Test H0 : σ2j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1]

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Page 121: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

101

0.0 0.2 0.4 0.6 0.8 1.0

−2

−1

01

2

Test random effect

Tran

sver

sal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure 5.8: (a) Results of the test for significance of the random effect horse in theTransversal Modified Dataset: regions presenting p-value ≤ 1% are represented in darkgray, p-value ≤ 5% in light gray. Acceleration curves are colored depending on the levelsof the factor lameForeHind_Degree: No, Fore_low, Fore_mod, Hind_low, Hind_mod.(b) Adjusted p-value function of the test for significance of the random effect horse in theTransversal Modified Dataset. The two red lines represent the thresholds 0.01 and 0.05.

Page 122: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

102 CHAPTER 5. RESULTS OF THE MODIFIED DATASETS

5.4.3 LONGITUDINAL Modified Dataset

Fixed Effect: lameForeHind_Degree (No, Hind_low, Hind_mod, Fore_low, Fore_mod)

Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Linear Mixed Model

aLONGmodijg (t) = µ(t) + lameForeHind_Degreeg(t) + horsej(t) + εijg(t)

Where:

• index i indicates the i-th observation, i = 1, ..., 70;

• index j indicates the j-th level of horse, j = 1, ..., 8;

• index g indicates the g-th level of lameForeHind_Degree, g = 1, ..., 5;

• horsej(t) are i.i.d. zero-mean random functions with variance σ2j (t), indepen-

dent from εijg(t), j = 1, ..., 8 t ∈ [0, 1]

Test H0 : σ2j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1]

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Page 123: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

103

0.0 0.2 0.4 0.6 0.8 1.0

−6

−4

−2

02

46

Test random effect

Long

itudi

nal A

ccel

erat

ions

(a)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure 5.9: (a) Results of the test for significance of the random effect horse in theLongitudinal Modified Dataset: regions presenting p-value ≤ 1% are represented in darkgray, p-value ≤ 5% in light gray. Acceleration curves are colored depending on the levelsof the factor lameForeHind_Degree: No, Fore_low, Fore_mod, Hind_low, Hind_mod.(b) Adjusted p-value function of the test for significance of the random effect horse in theLongitudinal Modified Dataset. The two red lines represent the thresholds 0.01 and 0.05.

Page 124: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 125: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Chapter 6

Conclusions

In this Thesis, we focused on inference for functional parameters of both

functional-on-scalar linear models (LMs) and functional-on-scalar linear mixed-effect

models (LMMs). The former are linear models where the response variable is a

function and the covariates are fixed scalar variables multiplied by fixed functional

parameters. Moreover, smooth and potentially correlated error curves can be

included adding random effects to model dependence between functional observa-

tions related to the same individual: this is the case of functional-on-scalar linear

mixed-effect models.

After providing estimates (Ordinary Least Squares for LM and REstricted

Maximum Likelihood for LMM) for the functional regression parameters and

predictions for subject specific random effects (Best Linear Unbiased Predictor),

we proposed two tests aimed at verifying if fixed and random effects actually have

to be included in the model. In particular the classical F -test and the Likelihood

Ratio Based Permutation Test proposed by Lee and Braun, 2012 in the scalar

case are extended to the functional setting to investigate the significance of the

functional parameters and variance components, respectively. All tests are based

on permutations of residuals under the reduced model (Freedman and Lane, 1985,

Section 2.5) and on the Interval-Wise Testing (IWT) procedure (Pini and Vantini,

2015, Section 2.1), a non-parametric method for testing functional data which is

able to select the intervals of the domain where the null hypothesis is rejected.

Testing for significance of fixed and random effects by means of permutational

approaches is an element of novelty when dealing with functional linear mixed

models. In fact this approach has not been explored yet in other works.

105

Page 126: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

106 CHAPTER 6. CONCLUSIONS

The motivation of this work was the analysis of equine accelerometric data

provided by the University of Copenhagen. Vertical, transversal and longitudinal

acceleration signals of eight horses trotting in a straight line, before and after

the induction of lameness, were studied. Specifically, groups of curves identified

by the lame limb were compared in order to determine how lameness affects the

gait of the horse. Such problems are considered within the functional analysis

of variance (FANOVA) framework, which is a particular case of functional linear

model. The design of the experiment, which consists of multiple measurements per

horse, suggested adding a random intercept to our model. In this way, we were able

to characterise the variation induced in the response by the different “subjects”.

Tests for the fixed effect were performed initially in a one-way FANOVA model

(LM) and then considering the same model with the addition of the random effect

(LMM). For each of these two models, permutations of the residuals were made

following two approaches: the first was the original method proposed by Freedman

and Lane and the second was a variant of the former, where permutations were

restricted to occur only within levels of the random factor. These four different

methods gave all equivalent results, except for the one relying on the linear model

and unrestricted permutations. In this latter case, the fact that the presence of the

horse effect is not taken into account has led to a decrease in power of the test.

The signals we actually analysed consisted in two-peaked curves, representing

average gait cycles. The first half of a curve was relative to the stance phase of the

right diagonal and the second half to the left diagonal. A new approach to examine

our accelerometric data was the introduction of the “modified” representation. The

original signals were modified in such a way that the first peak of the curves

was associated with the stance phase of the sound diagonal and the second peak

with the lame diagonal: this caused the loss of information of the lame side

(right/left). This representation allowed us to study the effect of the degree of

lameness (low/moderate) on the accelerations, which could not be done with the

original data due to the insufficient number of permutable units.

The following conclusions can be drawn from the results of our tests for the fixed

effect both on the original and on the modified datasets. In these tests, domain

selection was able to provide detailed information on the parts of the stride which

are more influenced by lameness. In particular it can be observed that:

Page 127: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

107

• Lameness has a more evident impact on the vertical component of the accel-

eration signals, especially in the landing and in the stance phase of the lame

diagonal;

• Hindlimbs lameness does not induce any detectable alteration in transversal

and longitudinal accelerations;

• A moderate lameness degree causes more evident effects than a low lameness

degree;

• The horse tends to reduce the norm of the acceleration vector during the

stance phase of the lame limb and to anticipate the landing of the sound limb

pair.

As regards the random intercept, it was found to be significant in almost the whole

domain, as we expected. This result validates the introduction of the horse effect

in the model and/or in the permutations.

The analyses presented in this work can be used as a preliminary study for the

construction of a classification method for functional data. In particular it would

be of sure interest to exploit the information provided by the domain selection

focusing only on the intervals where the groups of curves are actually different. This

objective method, combined with the clinical examination of the horse physical

condition, would be very helpful to provide a correct and precise diagnosis.

Another future development could be a combined analysis of accelerations of

horse trotting both in a straight line and in a circle. In the latter case lameness is

accentuated when the affected limb is on the inside of the circle. Consequently the

information of the lame side (right/left) could be retrieved by these data, while the

distinction between lame forelimbs and hindlimbs could be provided by the analysis

of the modified signals of horses trotting in a straight line. Besides also the severity

of the lameness could be determined by the modified representation.

Page 128: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 129: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Appendix A

Graphical results of test for the fixedeffect of Peak1 - Peak2 Datasets

In this Appendix, the results of tests for significance of the fixed effect of Peak1- Peak2 Datasets are presented. In particular:

• Section A.1: results of test for the fixed effect lameLeg of the Original Peak1- Peak2 Datasets;

• Section A.2: results of test for the fixed effect lameForeHind of the ModifiedPeak1 - Peak2 Datasets;

• Section A.3: results of test for the fixed effect lameForeHind_Degree of theModified Peak1 - Peak2 Datasets.

All the tests have been performed according to the procedure described in Section2.3.

109

Page 130: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

110 APPENDIX A. GRAPHICAL RESULTS FIXED EFFECT

A.1 Results of the Original Peak1 - Peak2 Datasetswith fixed effect lameLeg

Fixed Effect: lameLeg (No, RH, RF, LH, LF)Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Models

• VERTICAL Original Peak1-Peak2{LM: ∆aV ERTorig (t) = µ(t) + lameLegg(t) + εig(t)

LMM: ∆aV ERTorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t)

• TRANSVERSAL Original Peak1-Peak2{LM: ∆aTRANSorig (t) = µ(t) + lameLegg(t) + εig(t)

LMM: ∆aTRANSorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t)

• LONGITUDINAL Original Peak1-Peak2{LM: ∆aLONGorig (t) = µ(t) + lameLegg(t) + εig(t)

LMM: ∆aLONGorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t)

Test{H0 : lameLegg(t) = 0 ∀g ∈ {1, ..., 5}, ∀t ∈ [0, 1/2]

H1 : lameLegg(t) 6= 0 for some g ∈ {1, ..., 5} and some t ∈ [0, 1/2]

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

Results

• VERTICAL Original Peak1-Peak2: Figure A.1 on the next page, Figure A.2on page 112

• TRANSVERSAL Original Peak1-Peak2: Figure A.3 on page 113, Figure A.4on page 114

• LONGITUDINAL Original Peak1-Peak2: Figure A.5 on page 115, Figure A.6on page 116

Page 131: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

A.1. ORIGINAL PEAK1 - PEAK2 DATASETS 111

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

1.0

−0.

50.

00.

51.

01.

5

Test fixed effect: unrestricted − LM

Ver

tical

Pea

k1 −

Pea

k2

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

1.0

−0.

50.

00.

51.

01.

5

Test fixed effect: restricted − LM

Ver

tical

Pea

k1 −

Pea

k2

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

1.0

−0.

50.

00.

51.

01.

5

Test fixed effect: unrestricted − LMM

Ver

tical

Pea

k1 −

Pea

k2

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

1.0

−0.

50.

00.

51.

01.

5

Test fixed effect: restricted − LMM

Ver

tical

Pea

k1 −

Pea

k2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure A.1: (a) Results of the four different tests for significance of the fixed effectlameLeg in the Vertical Original Peak1-Peak2 Dataset: regions presenting p-value ≤ 1%are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameLeg in the Vertical Original Peak1-Peak2 Dataset. The two red lines represent thethresholds 0.01 and 0.05.

Page 132: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

112 APPENDIX A. GRAPHICAL RESULTS FIXED EFFECT

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.5

1.0

1.5

No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.5

1.0

1.5

RH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.5

1.0

1.5

RF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.5

1.0

1.5

LH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.5

1.0

1.5

LF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.0

0.5

1.0

1.5

No−RH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−RH

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.0

0.5

1.0

1.5

No−RF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−RF

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.0

0.5

1.0

1.5

No−LH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−LH

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.0

0.5

1.0

1.5

No−LF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−LF

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.0

0.5

1.0

1.5

RH−RF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

RH−RF

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.0

0.5

1.0

1.5

RH−LH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

RH−LH

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.0

0.5

1.0

1.5

RH−LF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

RH−LF

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.0

0.5

1.0

1.5

RF−LH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

RF−LH

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.0

0.5

1.0

1.5

RF−LF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

RF−LF

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

0.5

0.0

0.5

1.0

1.5

LH−LF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

LH−LF

X

p−va

lue

Figure A.2: Results of the restricted - LM pairwise test for significance of the fixed effectlameLeg in the Vertical Original Peak1-Peak2 Dataset. Diagonal: plots of the functionaldata of each group, all the other data are represented in gray. Superior diagonal: meansof each pairwise comparison, and regions presenting a significant difference controllingthe IWER at 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal: p-value (dashed line) and adjusted p-value (solid line) functions associated to the pairwisedifferences between the curves of the five group representing the lame limb.

Page 133: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

A.1. ORIGINAL PEAK1 - PEAK2 DATASETS 113

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: unrestricted − LM

Tran

sver

sal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: restricted − LM

Tran

sver

sal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: unrestricted − LMM

Tran

sver

sal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: restricted − LMM

Tran

sver

sal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure A.3: (a) Results of the four different tests for significance of the fixed effectlameLeg in the Vertical Original Peak1-Peak2 Dataset: regions presenting p-value ≤ 1%are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameLeg in the Transversal Original Peak1-Peak2 Dataset. The two red lines representthe thresholds 0.01 and 0.05.

Page 134: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

114 APPENDIX A. GRAPHICAL RESULTS FIXED EFFECT

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

RH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

RF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

LH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

LF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

No−RH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−RH

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

No−RF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−RF

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

No−LH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−LH

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

No−LF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−LF

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

RH−RF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

RH−RF

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

RH−LH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

RH−LH

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

RH−LF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

RH−LF

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

RF−LH

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

RF−LH

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

RF−LF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

RF−LF

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

LH−LF

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

LH−LF

X

p−va

lue

Figure A.4: Results of the restricted - LM pairwise test for significance of the fixedeffect lameLeg in the Transversal Original Peak1-Peak2 Dataset. Diagonal: plots ofthe functional data of each group, all the other data are represented in gray. Superiordiagonal: means of each pairwise comparison, and regions presenting a significant differencecontrolling the IWER at 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal:p-value (dashed line) and adjusted p-value (solid line) functions associated to the pairwisedifferences between the curves of the five group representing the lame limb.

Page 135: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

A.1. ORIGINAL PEAK1 - PEAK2 DATASETS 115

0.0 0.1 0.2 0.3 0.4 0.5

−6

−4

−2

02

4

Test fixed effect: unrestricted − LM

Long

itudi

nal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−6

−4

−2

02

4

Test fixed effect: restricted − LM

Long

itudi

nal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−6

−4

−2

02

4

Test fixed effect: unrestricted − LMM

Long

itudi

nal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−6

−4

−2

02

4

Test fixed effect: restricted − LMM

Long

itudi

nal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure A.5: (a) Results of the four different tests for significance of the fixed effectlameLeg in the Longitudinal Original Peak1-Peak2 Dataset: regions presenting p-value≤ 1% are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curves arecolored depending on the levels of the factor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameLeg in the Longitudinal Original Peak1-Peak2 Dataset. The two red lines representthe thresholds 0.01 and 0.05.

Page 136: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

116 APPENDIX A. GRAPHICAL RESULTS FIXED EFFECT

0 10 20 30 40 50

−6

−4

−2

02

4

No

X

Y

0 10 20 30 40 50

−6

−4

−2

02

4

RH

X

Y

0 10 20 30 40 50

−6

−4

−2

02

4

RF

X

Y

0 10 20 30 40 50

−6

−4

−2

02

4

LH

X

Y

0 10 20 30 40 50

−6

−4

−2

02

4

LF

X

Y

0 10 20 30 40 50

−4

−2

02

4

No−RH

X

Y

0 10 20 30 40 50

0.0

0.2

0.4

0.6

0.8

1.0

No−RH

X

p−va

lue

0 10 20 30 40 50

−4

−2

02

4

No−RF

X

Y

0 10 20 30 40 50

0.0

0.2

0.4

0.6

0.8

1.0

No−RF

X

p−va

lue

0 10 20 30 40 50

−4

−2

02

4

No−LH

X

Y

0 10 20 30 40 50

0.0

0.2

0.4

0.6

0.8

1.0

No−LH

X

p−va

lue

0 10 20 30 40 50

−4

−2

02

4

No−LF

X

Y

0 10 20 30 40 50

0.0

0.2

0.4

0.6

0.8

1.0

No−LF

X

p−va

lue

0 10 20 30 40 50

−4

−2

02

4

RH−RF

X

Y

0 10 20 30 40 50

0.0

0.2

0.4

0.6

0.8

1.0

RH−RF

X

p−va

lue

0 10 20 30 40 50

−4

−2

02

4

RH−LH

X

Y

0 10 20 30 40 50

0.0

0.2

0.4

0.6

0.8

1.0

RH−LH

X

p−va

lue

0 10 20 30 40 50

−4

−2

02

4

RH−LF

X

Y

0 10 20 30 40 50

0.0

0.2

0.4

0.6

0.8

1.0

RH−LF

X

p−va

lue

0 10 20 30 40 50

−4

−2

02

4

RF−LH

X

Y

0 10 20 30 40 50

0.0

0.2

0.4

0.6

0.8

1.0

RF−LH

X

p−va

lue

0 10 20 30 40 50

−4

−2

02

4

RF−LF

X

Y

0 10 20 30 40 50

0.0

0.2

0.4

0.6

0.8

1.0

RF−LF

X

p−va

lue

0 10 20 30 40 50

−4

−2

02

4

LH−LF

X

Y

0 10 20 30 40 50

0.0

0.2

0.4

0.6

0.8

1.0

LH−LF

X

p−va

lue

Figure A.6: Results of the restricted - LM pairwise test for significance of the fixedeffect lameLeg in the Longitudinal Original Peak1-Peak2 Dataset. Diagonal: plots ofthe functional data of each group, all the other data are represented in gray. Superiordiagonal: means of each pairwise comparison, and regions presenting a significant differencecontrolling the IWER at 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal:p-value (dashed line) and adjusted p-value (solid line) functions associated to the pairwisedifferences between the curves of the five group representing the lame limb.

Page 137: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

A.2 Results of the Modified Peak1 - Peak2 Datasetswith fixed effect lameForeHind

Fixed Effect: lameForeHind (No, Hind, Fore)Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Models

• VERTICAL Modified Peak1-Peak2{LM: ∆aV ERTmodig (t) = µ(t) + lameForeHindg(t) + εig(t)

LMM: ∆aV ERTmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t)

• TRANSVERSAL Modified Peak1-Peak2{LM: ∆aTRANSmodig (t) = µ(t) + lameForeHindg(t) + εig(t)

LMM: ∆aTRANSmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t)

• LONGITUDINAL Modified Peak1-Peak2{LM: ∆aLONGmodig (t) = µ(t) + lameForeHindg(t) + εig(t)

LMM: ∆aLONGmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t)

Test{H0 : lameForeHindg(t) = 0 ∀g ∈ {1, ..., 5}, ∀t ∈ [0, 1/2]

H1 : lameForeHindg(t) 6= 0 for some g ∈ {1, ..., 5} and some t ∈ [0, 1/2]

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

Results

• VERTICAL Modified Peak1-Peak2: Figure A.7 on the next page, Figure A.8on page 119

• TRANSVERSAL Modified Peak1-Peak2: Figure A.9 on page 120, Figure A.10on page 121

• LONGITUDINAL Modified Peak1-Peak2: Figure A.11 on page 122, Fig-ure A.12 on page 123

117

Page 138: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

118 APPENDIX A. GRAPHICAL RESULTS FIXED EFFECT

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5Test fixed effect: unrestricted − LM

Ver

tical

Pea

k1 −

Pea

k2

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Test fixed effect: restricted − LM

Ver

tical

Pea

k1 −

Pea

k2

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Test fixed effect: unrestricted − LMM

Ver

tical

Pea

k1 −

Pea

k2

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Test fixed effect: restricted − LMM

Ver

tical

Pea

k1 −

Pea

k2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure A.7: (a) Results of the four different tests for significance of the fixed effectlameForeHind in the Vertical Modified Peak1-Peak2 Dataset: regions presenting p-value≤ 1% are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curves arecolored depending on the levels of the factor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameForeHind in the Vertical Modified Peak1-Peak2 Dataset. The two red lines representthe thresholds 0.01 and 0.05.

Page 139: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

A.2. MODIFIED PEAK1 - PEAK2 DATASETS 119

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Hind

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Fore

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

No−Hind

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−Hind

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

No−Fore

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−Fore

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Hind−Fore

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind−Fore

X

p−va

lue

Figure A.8: Results of the restricted - LM pairwise test for significance of the fixedeffect lameForeHind in the Vertical Modified Peak1-Peak2 Dataset. Diagonal: plots ofthe functional data of each group, all the other data are represented in gray. Superiordiagonal: means of each pairwise comparison, and regions presenting a significant differencecontrolling the IWER at 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal:p-value (dashed line) and adjusted p-value (solid line) functions associated to the pairwisedifferences between the curves of the five group representing the lame limb.

Page 140: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

120 APPENDIX A. GRAPHICAL RESULTS FIXED EFFECT

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: unrestricted − LMTr

ansv

ersa

l Pea

k1 −

Pea

k2

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: restricted − LM

Tran

sver

sal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: unrestricted − LMM

Tran

sver

sal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: restricted − LMM

Tran

sver

sal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure A.9: (a) Results of the four different tests for significance of the fixed effectlameForeHind in the Vertical Modified Peak1-Peak2 Dataset: regions presenting p-value≤ 1% are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curves arecolored depending on the levels of the factor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameForeHind in the Transversal Modified Peak1-Peak2 Dataset. The two red linesrepresent the thresholds 0.01 and 0.05.

Page 141: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

A.2. MODIFIED PEAK1 - PEAK2 DATASETS 121

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Hind

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Fore

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

No−Hind

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−Hind

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

No−Fore

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−Fore

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

Hind−Fore

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind−Fore

X

p−va

lue

Figure A.10: Results of the restricted - LM pairwise test for significance of the fixedeffect lameForeHind in the Transversal Modified Peak1-Peak2 Dataset. Diagonal: plotsof the functional data of each group, all the other data are represented in gray. Superiordiagonal: means of each pairwise comparison, and regions presenting a significant differencecontrolling the IWER at 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal:p-value (dashed line) and adjusted p-value (solid line) functions associated to the pairwisedifferences between the curves of the five group representing the lame limb.

Page 142: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

122 APPENDIX A. GRAPHICAL RESULTS FIXED EFFECT

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Test fixed effect: unrestricted − LMLo

ngitu

dina

l Pea

k1 −

Pea

k2

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Test fixed effect: restricted − LM

Long

itudi

nal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Test fixed effect: unrestricted − LMM

Long

itudi

nal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Test fixed effect: restricted − LMM

Long

itudi

nal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure A.11: (a) Results of the four different tests for significance of the fixed effectlameForeHind in the Longitudinal Modified Peak1-Peak2 Dataset: regions presentingp-value ≤ 1% are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curvesare colored depending on the levels of the factor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameForeHind in the Longitudinal Modified Peak1-Peak2 Dataset. The two red linesrepresent the thresholds 0.01 and 0.05.

Page 143: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

A.2. MODIFIED PEAK1 - PEAK2 DATASETS 123

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Hind

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Fore

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

No−Hind

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−Hind

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

No−Fore

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

No−Fore

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Hind−Fore

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind−Fore

X

p−va

lue

Figure A.12: Results of the restricted - LM pairwise test for significance of the fixedeffect lameForeHind in the Longitudinal Modified Peak1-Peak2 Dataset. Diagonal: plotsof the functional data of each group, all the other data are represented in gray. Superiordiagonal: means of each pairwise comparison, and regions presenting a significant differencecontrolling the IWER at 1% (dark gray areas) and 5% (light gray areas). Inferior diagonal:p-value (dashed line) and adjusted p-value (solid line) functions associated to the pairwisedifferences between the curves of the five group representing the lame limb.

Page 144: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

124 APPENDIX A. GRAPHICAL RESULTS FIXED EFFECT

A.3 Results of the Modified Peak1 - Peak2 Datasetswith fixed effect lameForeHind_Degree

Fixed Effect: lameForeHind_Degree (No, Hind_low, Hind_mod, Fore_low, Fore_mod)Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Models

• VERTICAL Modified Peak1-Peak2{LM: ∆aV ERTmodig (t) = µ(t) + lameFH_Degreeg(t) + εig(t)

LMM: ∆aV ERTmodijg (t) = µ(t) + lameFH_Degreeg(t) + horsej(t) + εijg(t)

• TRANSVERSAL Modified Peak1-Peak2{LM: ∆aTRANSmodig (t) = µ(t) + lameFH_Degreeg(t) + εig(t)

LMM: ∆aTRANSmodijg (t) = µ(t) + lameFH_Degreeg(t) + horsej(t) + εijg(t)

• LONGITUDINAL Modified Peak1-Peak2{LM: ∆aLONGmodig (t) = µ(t) + lameFH_Degreeg(t) + εig(t)

LMM: ∆aLONGmodijg (t) = µ(t) + lameFH_Degreeg(t) + horsej(t) + εijg(t)

Test{H0 : lameForeHind_Degreeg(t) = 0 ∀g ∈ {1, ..., 5}, ∀t ∈ [0, 1/2]

H1 : lameForeHind_Degreeg(t) 6= 0 for some g ∈ {1, ..., 5} and some t ∈ [0, 1/2]

Test statistic

T Ifixed =

∫I

SSE(t)/dfexplSSR(t)/dfres

dt

Results

• VERTICAL Modified Peak1-Peak2: Figure A.13 on the next page, Figure A.14on page 126

• TRANSVERSAL Modified Peak1-Peak2: Figure A.15 on page 127, Fig-ure A.16 on page 128

• LONGITUDINAL Modified Peak1-Peak2: Figure A.17 on page 129, Fig-ure A.18 on page 130

Page 145: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

A.3. MODIFIED PEAK1 - PEAK2 DATASETS 125

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Test fixed effect: unrestricted − LM

Ver

tical

Pea

k1 −

Pea

k2

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Test fixed effect: restricted − LM

Ver

tical

Pea

k1 −

Pea

k2

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Test fixed effect: unrestricted − LMM

Ver

tical

Pea

k1 −

Pea

k2

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Test fixed effect: restricted − LMM

Ver

tical

Pea

k1 −

Pea

k2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure A.13: (a) Results of the four different tests for significance of the fixed effectlameForeHind_Degree in the Vertical Modified Peak1-Peak2 Dataset: regions presentingp-value ≤ 1% are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curvesare colored depending on the levels of the factor lameForeHind_Degree: No, Fore_low,Fore_mod, Hind_low, Hind_mod.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameForeHind_Degree in the Vertical Modified Peak1-Peak2 Dataset. The two redlines represent the thresholds 0.01 and 0.05.

Page 146: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

126 APPENDIX A. GRAPHICAL RESULTS FIXED EFFECT

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Fore_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Fore_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Hind_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Fore_low−Fore_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Fore_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Fore_low−Hind_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_low

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Fore_low−Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Fore_low−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−No

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Fore_mod−Hind_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_low

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Fore_mod−Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Fore_mod−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−No

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Hind_low−Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−Hind_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Hind_low−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−No

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Hind_mod−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind_mod−No

X

p−va

lue

Figure A.14: Results of the restricted - LM pairwise test for significance of the fixedeffect lameForeHind_Degree in the Vertical Modified Peak1-Peak2 Dataset. Diagonal:plots of the functional data of each group, all the other data are represented in gray.Superior diagonal: means of each pairwise comparison, and regions presenting a significantdifference controlling the IWER at 1% (dark gray areas) and 5% (light gray areas). Inferiordiagonal: p-value (dashed line) and adjusted p-value (solid line) functions associated tothe pairwise differences between the curves of the five group representing the lame limb.

Page 147: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

A.3. MODIFIED PEAK1 - PEAK2 DATASETS 127

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: unrestricted − LM

Tran

sver

sal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: restricted − LM

Tran

sver

sal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: unrestricted − LMM

Tran

sver

sal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test fixed effect: restricted − LMM

Tran

sver

sal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure A.15: (a) Results of the four different tests for significance of the fixed effectlameForeHind_Degree in the Vertical Modified Peak1-Peak2 Dataset: regions presentingp-value ≤ 1% are represented in dark gray, p-value ≤ 5% in light gray. Acceleration curvesare colored depending on the levels of the factor lameForeHind_Degree: No, Fore_low,Fore_mod, Hind_low, Hind_mod.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameForeHind_Degree in the Transversal Modified Peak1-Peak2 Dataset. The two redlines represent the thresholds 0.01 and 0.05.

Page 148: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

128 APPENDIX A. GRAPHICAL RESULTS FIXED EFFECT

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Fore_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Fore_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Hind_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

Fore_low−Fore_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Fore_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

Fore_low−Hind_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_low

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

Fore_low−Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

Fore_low−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−No

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

Fore_mod−Hind_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_low

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

Fore_mod−Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

Fore_mod−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−No

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

Hind_low−Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−Hind_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

Hind_low−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−No

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

2

Hind_mod−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind_mod−No

X

p−va

lue

Figure A.16: Results of the restricted - LM pairwise test for significance of the fixed effectlameForeHind_Degree in the Transversal Modified Peak1-Peak2 Dataset. Diagonal:plots of the functional data of each group, all the other data are represented in gray.Superior diagonal: means of each pairwise comparison, and regions presenting a significantdifference controlling the IWER at 1% (dark gray areas) and 5% (light gray areas). Inferiordiagonal: p-value (dashed line) and adjusted p-value (solid line) functions associated tothe pairwise differences between the curves of the five group representing the lame limb.

Page 149: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

A.3. MODIFIED PEAK1 - PEAK2 DATASETS 129

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Test fixed effect: unrestricted − LM

Long

itudi

nal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Test fixed effect: restricted − LM

Long

itudi

nal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Test fixed effect: unrestricted − LMM

Long

itudi

nal P

eak1

− P

eak2

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Test fixed effect: restricted − LMM

Long

itudi

nal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test fixed effect

Adj

uste

d p−

valu

e

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

unrestricted − LMrestricted − LMunrestricted − LMMrestricted − LMM

(b)

Figure A.17: (a) Results of the four different tests for significance of the fixed effectlameForeHind_Degree in the Longitudinal Modified Peak1-Peak2 Dataset: regions pre-senting p-value ≤ 1% are represented in dark gray, p-value ≤ 5% in light gray. Accelerationcurves are colored depending on the levels of the factor lameForeHind_Degree: No,Fore_low, Fore_mod, Hind_low, Hind_mod.(b) Adjusted p-value function of the four different tests for significance of the fixed effectlameForeHind_Degree in the Longitudinal Modified Peak1-Peak2 Dataset. The twored lines represent the thresholds 0.01 and 0.05.

Page 150: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

130 APPENDIX A. GRAPHICAL RESULTS FIXED EFFECT

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Fore_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Fore_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Hind_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Fore_low−Fore_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Fore_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Fore_low−Hind_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_low

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Fore_low−Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−Hind_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Fore_low−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_low−No

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Fore_mod−Hind_low

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_low

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Fore_mod−Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−Hind_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Fore_mod−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Fore_mod−No

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Hind_low−Hind_mod

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−Hind_mod

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Hind_low−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind_low−No

X

p−va

lue

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Hind_mod−No

X

Y

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Hind_mod−No

X

p−va

lue

Figure A.18: Results of the restricted - LM pairwise test for significance of the fixed effectlameForeHind_Degree in the Longitudinal Modified Peak1-Peak2 Dataset. Diagonal:plots of the functional data of each group, all the other data are represented in gray.Superior diagonal: means of each pairwise comparison, and regions presenting a significantdifference controlling the IWER at 1% (dark gray areas) and 5% (light gray areas). Inferiordiagonal: p-value (dashed line) and adjusted p-value (solid line) functions associated tothe pairwise differences between the curves of the five group representing the lame limb.

Page 151: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Appendix B

Graphical results of test for therandom effect of Peak1 - Peak2Datasets

In this Appendix, the results of tests for significance of the random effect ofPeak1 - Peak2 Datasets are presented. In particular:

• Section B.1: results of test for the random effect of the Original Peak1 - Peak2Datasets, where the fixed effect of the LMM is represented by the factorlameLeg;

• Section B.2: results of test for the random effect of the Modified Peak1 -Peak2 Datasets, where the fixed effect of the LMM is represented by thefactor lameForeHind;

• Section B.3: results of test for the random effect of the Modified Peak1 -Peak2 Datasets, where the fixed effect of the LMM is represented by thefactor lameForeHind_Degree.

All the tests have been performed according to the procedure described in Section2.4.

131

Page 152: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

132 APPENDIX B. GRAPHICAL RESULTS RANDOM EFFECT

B.1 Results of the Original Peak1 - Peak2 Datasetswith fixed effect lameLeg

Fixed Effect: lameLeg (No, RH, RF, LH, LF)Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Models

• VERTICAL Original Peak1-Peak2

∆aV ERTorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t)

• TRANSVERSAL Original Peak1-Peak2

∆aTRANSorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t)

• LONGITUDINAL Original Peak1-Peak2

∆aLONGorijg (t) = µ(t) + lameLegg(t) + horsej(t) + εijg(t)

Test {H0 : σ2

j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1/2]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1/2]

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Results

• VERTICAL Original Peak1-Peak2: Figure B.1 on the next page

• TRANSVERSAL Original Peak1-Peak2: Figure B.2 on page 134

• LONGITUDINAL Original Peak1-Peak2: Figure B.3 on page 135

Page 153: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

B.1. ORIGINAL PEAK1 - PEAK2 DATASETS 133

0.0 0.1 0.2 0.3 0.4 0.5

−1.

5−

1.0

−0.

50.

00.

51.

01.

5

Test random effect

Ver

tical

Pea

k1 −

Pea

k2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure B.1: (a) Results of the test for significance of the random effect horse in theVertical Original Peak1-Peak2 Dataset: regions presenting p-value ≤ 1% are representedin dark gray, p-value ≤ 5% in light gray. Acceleration curves are colored depending onthe levels of the factor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the test for significance of the random effect horse in theVertical Original Peak1-Peak2 Dataset. The two red lines represent the thresholds 0.01and 0.05.

Page 154: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

134 APPENDIX B. GRAPHICAL RESULTS RANDOM EFFECT

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test random effect

Tran

sver

sal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure B.2: (a) Results of the test for significance of the random effect horse inthe Transversal Original Peak1-Peak2 Dataset: regions presenting p-value ≤ 1% arerepresented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the test for significance of the random effect horse in theTransversal Original Peak1-Peak2 Dataset. The two red lines represent the thresholds0.01 and 0.05.

Page 155: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

B.1. ORIGINAL PEAK1 - PEAK2 DATASETS 135

0.0 0.1 0.2 0.3 0.4 0.5

−6

−4

−2

02

4

Test random effect

Long

itudi

nal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure B.3: (a) Results of the test for significance of the random effect horse inthe Longitudinal Original Peak1-Peak2 Dataset: regions presenting p-value ≤ 1% arerepresented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameLeg: No, RH, RF, LH, LF.(b) Adjusted p-value function of the test for significance of the random effect horse in theLongitudinal Original Peak1-Peak2 Dataset. The two red lines represent the thresholds0.01 and 0.05.

Page 156: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

136 APPENDIX B. GRAPHICAL RESULTS RANDOM EFFECT

B.2 Results of the Modified Peak1 - Peak2 Datasetswith fixed effect lameForeHind

Fixed Effect: lameForeHind (No, Hind, Fore)Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Models

• VERTICAL Modified Peak1-Peak2

∆aV ERTmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t)

• TRANSVERSAL Modified Peak1-Peak2

∆aTRANSmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t)

• LONGITUDINAL Modified Peak1-Peak2

∆aLONGmodijg (t) = µ(t) + lameForeHindg(t) + horsej(t) + εijg(t)

Test {H0 : σ2

j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1/2]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1/2]

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Results

• VERTICAL Modified Peak1-Peak2: Figure B.4 on the facing page

• TRANSVERSAL Modified Peak1-Peak2: Figure B.5 on page 138

• LONGITUDINAL Modified Peak1-Peak2: Figure B.6 on page 139

Page 157: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

B.2. MODIFIED PEAK1 - PEAK2 DATASETS 137

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Test random effect

Ver

tical

Pea

k1 −

Pea

k2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure B.4: (a) Results of the test for significance of the random effect horse in theVertical Modified Peak1-Peak2 Dataset: regions presenting p-value ≤ 1% are representedin dark gray, p-value ≤ 5% in light gray. Acceleration curves are colored depending onthe levels of the factor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the test for significance of the random effect horse in theVertical Modified Peak1-Peak2 Dataset. The two red lines represent the thresholds 0.01and 0.05.

Page 158: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

138 APPENDIX B. GRAPHICAL RESULTS RANDOM EFFECT

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test random effect

Tran

sver

sal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure B.5: (a) Results of the test for significance of the random effect horse inthe Transversal Modified Peak1-Peak2 Dataset: regions presenting p-value ≤ 1% arerepresented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the test for significance of the random effect horse in theTransversal Modified Peak1-Peak2 Dataset. The two red lines represent the thresholds0.01 and 0.05.

Page 159: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

B.2. MODIFIED PEAK1 - PEAK2 DATASETS 139

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Test random effect

Long

itudi

nal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure B.6: (a) Results of the test for significance of the random effect horse inthe Longitudinal Modified Peak1-Peak2 Dataset: regions presenting p-value ≤ 1% arerepresented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameForeHind: No, Hind, Fore.(b) Adjusted p-value function of the test for significance of the random effect horse in theLongitudinal Modified Peak1-Peak2 Dataset. The two red lines represent the thresholds0.01 and 0.05.

Page 160: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

140 APPENDIX B. GRAPHICAL RESULTS RANDOM EFFECT

B.3 Results of the Modified Peak1 - Peak2 Datasetswith fixed effect lameForeHind_Degree

Fixed Effect: lameForeHind_Degree (No, Hind_low, Hind_mod, Fore_low, Fore_mod)Random Effect: horse (B1, B2, B3, B4, B5, B6, B7, B8)

Models

• VERTICAL Modified Peak1-Peak2

∆aV ERTmodijg (t) = µ(t) + lameForeHind_Degreeg(t) + horsej(t) + εijg(t)

• TRANSVERSAL Modified Peak1-Peak2

∆aTRANSmodijg (t) = µ(t) + lameForeHind_Degreeg(t) + horsej(t) + εijg(t)

• LONGITUDINAL Modified Peak1-Peak2

∆aLONGmodijg (t) = µ(t) + lameForeHind_Degreeg(t) + horsej(t) + εijg(t)

Test {H0 : σ2

j (t) = 0 ∀j ∈ {1, ..., 8}, ∀t ∈ [0, 1/2]

H1 : σ2j (t) 6= 0 for some j ∈ {1, ..., 8} and some t ∈ [0, 1/2]

Test statistic

T Irandom = e∫I (−2 log (L

Ht0−L

Ht1))dt

Results

• VERTICAL Modified Peak1-Peak2: Figure B.7 on the next page

• TRANSVERSAL Modified Peak1-Peak2: Figure B.8 on page 142

• LONGITUDINAL Modified Peak1-Peak2: Figure B.9 on page 143

Page 161: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

B.3. MODIFIED PEAK1 - PEAK2 DATASETS 141

0.0 0.1 0.2 0.3 0.4 0.5

−0.

50.

00.

51.

01.

5

Test random effect

Ver

tical

Pea

k1 −

Pea

k2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure B.7: (a) Results of the test for significance of the random effect horse in theVertical Modified Peak1-Peak2 Dataset: regions presenting p-value ≤ 1% are representedin dark gray, p-value ≤ 5% in light gray. Acceleration curves are colored depending onthe levels of the factor lameForeHind_Degree: No, Fore_low, Fore_mod, Hind_low,Hind_mod.(b) Adjusted p-value function of the test for significance of the random effect horse in theVertical Modified Peak1-Peak2 Dataset. The two red lines represent the thresholds 0.01and 0.05.

Page 162: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

142 APPENDIX B. GRAPHICAL RESULTS RANDOM EFFECT

0.0 0.1 0.2 0.3 0.4 0.5

−3

−2

−1

01

23

Test random effect

Tran

sver

sal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure B.8: (a) Results of the test for significance of the random effect horse inthe Transversal Modified Peak1-Peak2 Dataset: regions presenting p-value ≤ 1% arerepresented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameForeHind_Degree: No, Fore_low, Fore_mod,Hind_low, Hind_mod.(b) Adjusted p-value function of the test for significance of the random effect horse in theTransversal Modified Peak1-Peak2 Dataset. The two red lines represent the thresholds0.01 and 0.05.

Page 163: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

B.3. MODIFIED PEAK1 - PEAK2 DATASETS 143

0.0 0.1 0.2 0.3 0.4 0.5

−4

−2

02

46

Test random effect

Long

itudi

nal P

eak1

− P

eak2

(a)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.2

0.4

0.6

0.8

1.0

Test random effect

Adj

uste

d p−

valu

e

(b)

Figure B.9: (a) Results of the test for significance of the random effect horse inthe Longitudinal Modified Peak1-Peak2 Dataset: regions presenting p-value ≤ 1% arerepresented in dark gray, p-value ≤ 5% in light gray. Acceleration curves are coloreddepending on the levels of the factor lameForeHind_Degree: No, Fore_low, Fore_mod,Hind_low, Hind_mod.(b) Adjusted p-value function of the test for significance of the random effect horse in theLongitudinal Modified Peak1-Peak2 Dataset. The two red lines represent the thresholds0.01 and 0.05.

Page 164: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented
Page 165: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Bibliography

Abramovich, F. and C. Angelini (2006), “Testing in mixed-effects FANOVAmodels”, Journal of Statistical Planning and Inference, Vol. 136, pp. 4326-4348.(Cited on p. 44.)

Abramowicz, K., S. De Luna, C. Häger, A. Pini, L. Schelin, and S. Vantini(2015), Distribution-Free Interval-Wise Inference for Functional-on-Scalar LinearModels, Technical Report 3/2015, MOX, Politecnico di Milano. (Cited on p. 12.)

Adams, O.R. and T.S. Stashak’s (2011), Lameness in Horses, 6th ed., Wiley-Blackwell. (Cited on pp. 5, 50.)

Anderson, M.J. and P. Legendre (1999), “An empirical comparison of permuta-tion methods for tests of partial regression coefficients in a linear model”, Journalof Statistical Computation and Simulation, Vol. 62, 3, pp. 271-303. (Cited onpp. 12, 27.)

Anderson, M.J. and J. Robinson (2001), “Permutation tests for linear models”,Australian & New Zealand Journal of Statistics, Vol. 43, 1, pp. 75-88. (Cited onpp. 12, 27.)

Anderson, M.J. and C.J.F. Ter Braak (2003), “Permutation tests for multi-factorial analysis of variance”, Journal of Statistical Computation and Simulation,Vol. 73, 2, pp. 85-113. (Cited on pp. 13, 27.)

Antoniadis, A. and T. Sapatinas (2007), “Estimation and inference in functionalmixed effects models”, Computational Statistics & Data Analysis, Vol. 51, 10,pp. 4793-4813. (Cited on p. 15.)

Audigié, F., P. Pourcelot, C. Degueurce, D. Geiger, and J.M. Denoix(2002), “Fourier analysis of trunk displacements: a method to identify the lamelimb in trotting horses”, Journal of Biomechanics, Vol. 35, pp. 1173-1182. (Citedon p. 7.)

Back, W., C.G. MacAllister, M.C.V. Van Heel, M. Pollmeier, and P.D.Hanson (2007), “Vertical frontlimb ground reaction forces of sound and lameWarmbloods differ from those in Quarter horses”, Journal of Equine VeterinaryScience, Vol. 27, 3, pp. 123-129. (Cited on p. 7.)

145

Page 166: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

146 Bibliography

Barrey, E. (1999), “Methods, Applications and Limitations of Gait Analysis inHorses”, The Veterinary Journal, Vol. 157, pp. 7-22. (Cited on pp. 3, 6.)

Bates, D. (2005), “Fitting linear mixed models in R”, R News, Vol. 5, 1, pp. 27-30.(Cited on p. 27.)

Buchner, H.H.F., H.H.C.M. Savelberg, H.C. Schamhardt, and A. Barn-eveld (1996), “Head and trunk movement adaptations in horses with experi-mentally induced fore- or hindlimb lameness”, Equine Veterinary Journal, Vol.28, pp. 71-76. (Cited on p. 8.)

Cuevas, A., M. Febrero, and R. Fraiman (2004), “An anova test for functionaldata”, Computational Statistics & Data Analysis, Vol. 47, 1, pp. 111-122. (Citedon p. 9.)

Drikvandi, R., G. Verbeke, A. Khodadadi, and V. Partovi Nia (2013), “Test-ing multiple variance components in linear mixed-effects models”, Biostatistics,Vol. 14, 1, pp. 144-159. (Cited on p. 14.)

Fitzmaurice, G. M., S. R. Lipsitz, and J. G. Ibrahim (2007), “A note onpermutation tests for variance components in multilevel generalized linear mixedmodels”, Biometrics, Vol. 63, pp. 942-946. (Cited on p. 14.)

Guo, W. (2002), “Functional Mixed Effects Models”, Biometrics, Vol. 58, pp. 121-128. (Cited on p. 15.)

Horváth, L. and P. Kokoszka (2012), Inference for functional data with applica-tions, Springer, vol. Vol. 200. (Cited on p. 9.)

Lee, O.E. (2012), Permutation Tests for Random Effects in Mixed Models, Ph.D.thesis, The University of Michigan. (Cited on pp. 14, 29, 30.)

Lee, O.E. and T.M. Braun (2012), “Permutation Tests for Random Effects inLinear Mixed Models”, Biometrics, Vol. 68, pp. 486-493. (Cited on pp. 14, 24,29, 30, 105.)

McCracken, M.J., J. Kramer, K.G. Keegan, M. Lopes, D.A. Wilson, S.K.Reed, A. LaCarrubba, and M. Rasch (2012), “Comparison of an inertialsensor system of lameness quantification with subjective lameness evaluation”,Equine Veterinary Journal, Vol. 44, 6, pp. 652-656.

Peham, C., M. Scheidl, and T. Licka (1996), “A method of signal processingin motion analysis of the trotting horse”, Biomechanics, Vol. 29, pp. 1111-1114.(Cited on p. 7.)

Pesarin, F. and L. Salmaso (2010), Permutation tests for complex data: theory,applications and software, John Wiley & Sons Inc., chap. 2. (Cited on p. 10.)

Page 167: Politecnico di Milano · Abstract Lameness detection and quantification in horses is an important, but often difficult, task for veterinarians. For this reason, many instrumented

Bibliography 147

Pini, A. (2014), Global and component-wise distribution-free inference for functionaldata: methods and applications, Ph.D. thesis, Department of Mathematics,Politecnico di Milano. (Cited on p. 11.)

Pini, A. and S. Vantini (2013), The interval testing procedure: inference forfunctional data controlling the family wise error rate on intervals, TechnicalReport 13/2013, MOX, Politecnico di Milano. (Cited on p. 11.)

Pini, A. and S. Vantini (2015), Interval-wise testing for functional data, TechnicalReport 30/2015, MOX, Politecnico di Milano. (Cited on pp. 12, 17, 20, 105.)

Ramsay, J. O. and B. W. Silverman (2002), Applied functional data analysis:methods and case studies, Springer, vol. Vol. 77. (Cited on pp. 9, 11.)

Ramsay, J. O. and B. W. Silverman (2005), Functional data analysis, Springer.(Cited on pp. 9, 11, 22.)

Ramsay, J. O., G. Hooker, and S. Graves (2009), Functional Data Analysiswith R and MATLAB, Springer.

Sørensen, H., A. Tolver, M.H. Thomsen, and P.H. Andersen (2012), “Quan-tification of symmetry for functional data with application to equine lamenessclassification”, Journal of Applied Statistics, Vol. 39, 2, pp. 337-360. (Cited onpp. 8, 33, 62.)

Thomsen, M.H., A. Persson, A. Jensen, H. Sørensen, and P.H. Andersen(2010a), “Agreement between accelerometric symmetry scores and clinical lame-ness scores during experimentally induced transient distension of the metacar-pophalangeal joint in horses”, Equine Veterinary Journal, Vol. 42, pp. 510-515.(Cited on pp. 6, 8.)

Thomsen, M.H., A. Jensen, H. Sørensen, C. Lindegaard, and P.H. An-dersen (2010b), “Symmetry indices based on accelerometric data in trottinghorses”, Journal of Biomechanics, Vol. 43, pp. 2608-2612. (Cited on pp. 8, 33.)

Uhlir, C., T. Licka, P. Kubber, C. Peham, M. Scheidl, and Girtler D.(1997), “Compensatory movements of horses with a stance phase lameness”,Equine Veterinary Journal, Suppl. 23, pp. 102-105. (Cited on p. 8.)

Winter, B. (2013), Linear models and linear mixed effects models in R withlinguistic applications, http://arxiv.org/pdf/1308.5499.pdf.