issues and solutions in fitting, evaluating, and ... · florian jaeger, victor kuperman sample data...

84
Issues and Solutions in Regression Modeling Florian Jaeger, Victor Kuperman Sample Data and Simple Models Building an interpretable model Model Evaluation Reporting the model Discussion Issues and Solutions in Fitting, Evaluating, and Interpreting Regression Models Florian Jaeger, Victor Kuperman March 24, 2009

Upload: others

Post on 23-Oct-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Model Evaluation

    Reporting themodel

    Discussion

    Issues and Solutions in Fitting,Evaluating, and Interpreting Regression

    Models

    Florian Jaeger, Victor Kuperman

    March 24, 2009

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Model Evaluation

    Reporting themodel

    Discussion

    Hypothesis testing in psycholinguisticresearch

    I Typically, we make predictions not just about theexistence, but also the direction of effects.

    I Sometimes, we’re also interested in effect shapes(non-linearities, etc.)

    I Unlike in ANOVA, regression analyses reliably testhypotheses about effect direction and shape withoutrequiring post-hoc analyses if (a) the predictors in themodel are coded appropriately and (b) the model canbe trusted.

    I Today: Provide an overview of (a) and (b).

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Model Evaluation

    Reporting themodel

    Discussion

    Overview

    I Introduce sample data and simple modelsI Towards a model with interpretable coefficients:

    I outlier removalI transformationI coding, centering, . . .I collinearity

    I Model evaluation:I fitted vs. observed valuesI model validationI investigation of residualsI case influence, outliers

    I Model comparisonI Reporting the model:

    I comparing effect sizesI back-transformation of predictorsI visualization

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Model Evaluation

    Reporting themodel

    Discussion

    Sample Data and Simple Models

    Building an interpretable modelData explorationTransformationCodingCenteringInteractions and modeling of non-linearitiesCollinearity

    What is collinearity?Detecting collinearityDealing with collinearity

    Model EvaluationBeware overfitting

    Detect overfitting: ValidationGoodness-of-fit

    Aside: Model Comparison

    Reporting the modelDescribing PredictorsWhat to reportBack-transforming coefficientsComparing effect sizesVisualizing effectsInterpreting and reporting interactions

    Discussion

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Model Evaluation

    Reporting themodel

    Discussion

    Data 1: Lexical decision RTs

    I Outcome: log lexical decision latency RTI Inputs:

    I factors Subject (21 levels) and Word (79 levels),I factor NativeLanguage (English and Other)I continuous predictors Frequency (log word frequency),

    and Trial (rank in the experimental list).

    Subject RT Trial NativeLanguage Word Frequency1 A1 6.340359 23 English owl 4.8598122 A1 6.308098 27 English mole 4.6051703 A1 6.349139 29 English cherry 4.9972124 A1 6.186209 30 English pear 4.7273885 A1 6.025866 32 English dog 7.6676266 A1 6.180017 33 English blackberry 4.060443

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Model Evaluation

    Reporting themodel

    Discussion

    Linear model of RTs

    > lin.lmer = lmer(RT ~ NativeLanguage ++ Frequency + Trial ++ (1 | Word) + (1 | Subject),+ data = lexdec)

    Random effects:Groups Name Variance Std.Dev.Word (Intercept) 0.0029448 0.054266Subject (Intercept) 0.0184082 0.135677Residual 0.0297268 0.172415

    Number of obs: 1659, groups: Word, 79; Subject, 21

    Fixed effects:Estimate Std. Error t value

    (Intercept) 6.548e+00 4.963e-02 131.94NativeLanguageOther 1.555e-01 6.043e-02 2.57Frequency -4.290e-02 5.829e-03 -7.36Trial -2.418e-04 9.122e-05 -2.65

    I estimates for random effects of Subject and Word andfor the residual error of the model: standard deviationand variance.

    I estimates for regression coefficients, standard errors →t-values

    I Effect significant if ± 2*SE does not include zero (ift-value of ± 2).

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Model Evaluation

    Reporting themodel

    Discussion

    Linear model of RTs (cnt’d)

    I t-value anti-conservative

    → MCMC-sampling of coefficients to obtain nonanti-conservative estimates

    > pvals.fnc(lin.lmer, nsim = 10000)

    $fixedEstimate MCMCmean HPD95lower HPD95upper pMCMC Pr(>|t|)

    (Intercept) 6.5476 6.5482 6.4653 6.6325 0.0001 0.0000NativeLanguageOther 0.1555 0.1551 0.0580 0.2496 0.0012 0.0001Frequency -0.0429 -0.0429 -0.0542 -0.0323 0.0001 0.0000Trial -0.0002 -0.0002 -0.0004 -0.0001 0.0068 0.0109

    $randomGroups Name Std.Dev. MCMCmedian MCMCmean HPD95lower HPD95upper

    1 Word (Intercept) 0.0564 0.0495 0.0497 0.0384 0.06192 Subject (Intercept) 0.1410 0.1070 0.1083 0.0832 0.13793 Residual 0.1792 0.1737 0.1737 0.1678 0.1799

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Model Evaluation

    Reporting themodel

    Discussion

    Data 2: Lexical decision responseI Outcome: Correct or incorrect response (Correct)I Inputs: same as in linear model

    > lmer(Correct == "correct" ~ NativeLanguage ++ Frequency + Trial ++ (1 | Subject) + (1 | Word),+ data = lexdec, family = "binomial")

    Random effects:Groups Name Variance Std.Dev.Word (Intercept) 1.01820 1.00906Subject (Intercept) 0.63976 0.79985Number of obs: 1659, groups: Word, 79; Subject, 21

    Fixed effects:Estimate Std. Error z value Pr(>|z|)

    (Intercept) -1.746e+00 8.206e-01 -2.128 0.033344 *NativeLanguageOther -5.726e-01 4.639e-01 1.234 0.217104Frequency 5.600e-01 1.570e-01 -3.567 0.000361 ***Trial 4.443e-06 2.965e-03 0.001 0.998804

    I estimates for random effects of Subject and Word (noresiduals).

    I estimates for regression coefficients, standard errors →Z- and p-values

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Model Evaluation

    Reporting themodel

    Discussion

    Interpretation of coefficients

    I In theory, directionality and shape of effects can betested and immediately interpreted.

    I e.g. logit model

    Fixed effects:Estimate Std. Error z value Pr(>|z|)

    (Intercept) -1.746e+00 8.206e-01 -2.128 0.033344 *NativeLanguageOther 5.726e-01 4.639e-01 1.234 0.217104Frequency -5.600e-01 1.570e-01 -3.567 0.000361 ***Trial -5.725e-06 2.965e-03 -0.002 0.998460

    I . . . but can these coefficient estimates be trusted?

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Data exploration

    Transformation

    Coding

    Centering

    Interactions and modelingof non-linearities

    Collinearity

    What is collinearity?

    Detecting collinearity

    Dealing with collinearity

    Model Evaluation

    Reporting themodel

    Discussion

    Sample Data and Simple Models

    Building an interpretable modelData explorationTransformationCodingCenteringInteractions and modeling of non-linearitiesCollinearity

    What is collinearity?Detecting collinearityDealing with collinearity

    Model EvaluationBeware overfitting

    Detect overfitting: ValidationGoodness-of-fit

    Aside: Model Comparison

    Reporting the modelDescribing PredictorsWhat to reportBack-transforming coefficientsComparing effect sizesVisualizing effectsInterpreting and reporting interactions

    Discussion

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Data exploration

    Transformation

    Coding

    Centering

    Interactions and modelingof non-linearities

    Collinearity

    What is collinearity?

    Detecting collinearity

    Dealing with collinearity

    Model Evaluation

    Reporting themodel

    Discussion

    Modeling schema

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Data exploration

    Transformation

    Coding

    Centering

    Interactions and modelingof non-linearities

    Collinearity

    What is collinearity?

    Detecting collinearity

    Dealing with collinearity

    Model Evaluation

    Reporting themodel

    Discussion

    Data exploration

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Data exploration

    Transformation

    Coding

    Centering

    Interactions and modelingof non-linearities

    Collinearity

    What is collinearity?

    Detecting collinearity

    Dealing with collinearity

    Model Evaluation

    Reporting themodel

    Discussion

    Data exploration

    I Select and understand input variables and outcomebased on a-priori theoretical consideration

    I How many parameters does your data afford(yoverfitting)?

    I Data exploration: Before fitting the model, exploreinputs and outputs

    I Outliers due to missing data or measurement error (e.g.RTs in SPR < 80msecs).

    I NB: postpone distribution-based outlier exclusion untilafter transformations)

    I Skewness in distribution can affect the accuracy ofmodel’s estimates (ytransformations).

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Data exploration

    Transformation

    Coding

    Centering

    Interactions and modelingof non-linearities

    Collinearity

    What is collinearity?

    Detecting collinearity

    Dealing with collinearity

    Model Evaluation

    Reporting themodel

    Discussion

    Understanding variance associated withpotential random effects

    I explore candidate predictors (e.g., Subject or Word) forlevel-specific variation.

    ●●

    ● ●

    ●●

    ●●

    ● ●

    ●●

    ●● ●

    ●●

    ●●●

    ●●

    ●●

    A1 A3 D J M1 P R2 S T2 W1 Z

    6.0

    6.5

    7.0

    7.5

    > boxplot(RT ~ Subject, data = lexdec)

    → Huge variance.

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Data exploration

    Transformation

    Coding

    Centering

    Interactions and modelingof non-linearities

    Collinearity

    What is collinearity?

    Detecting collinearity

    Dealing with collinearity

    Model Evaluation

    Reporting themodel

    Discussion

    Random effects (cnt’d)

    I explore variation of level-specific slopes.

    Trial

    RT

    6.06.57.07.5

    50 100150

    ●●●●●●●●●●●●●●●

    ●●●

    ●●

    ●●

    ●●●●●

    ●●●●●●●●●●●●●●●●●●

    ●●●●

    ●●●●●●

    ●●

    ●●

    ●●

    ●●●●●●●●●

    ●●●

    ●●

    A1

    ●●●●●●●●●●●

    ●●●●●●●●

    ●●●●●●●●●

    ●●

    ●●●●●●●●●

    ●●●●

    ●●

    ●●●●

    ●●●●●●●●●●●●●●

    ●●●●●●●●●●●

    A2

    50 100150

    ●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●

    ●●●●●●●●●●●●

    ●●●●●

    ●●●●●●●●●●●●●●●

    A3

    ●●●●●●●●●●●●●

    ●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●

    ●●

    ●●●●●●●

    ●●●●●●●●●●●●●

    C

    50 100150

    ●●●●●●●●●●●●●●●●●●

    ●●●●●●●

    ●●

    ●●●●●●●●●●●●●●●●●●●●

    ●●

    ●●●●●●●●

    ●●●

    ●●●●●●●●

    ●●●●●●●●

    D

    ●●

    ●●●●●●

    ●●

    ●●

    ●●

    ●●●●●●●●●●●

    ●●●●●

    ●●●●●

    ●●●

    ●●●●●●●●●●●●●●

    ●●●●●

    ●●●●●●●

    ●●

    ●●

    I

    ●●●●

    ●●●●

    ●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●

    ●●●●●●●●●

    ●●●●

    ●●●●

    ●●●●●●●●●●●●●●

    J

    ●●●●●

    ●●●●●

    ●●●●●●●●

    ●●●●●

    ●●●●●●●●

    ●●●●●

    ●●●●●●●

    ●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●

    ●●●

    K

    ●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●

    ●●●●●

    ●●●●●●●●●●●●●●●●

    ●●●●●●●●●●

    ●●●●●●●●●

    ●●●●●●●●

    M1

    6.06.57.07.5

    ●●●●●●

    ●●

    ●●●●●●●

    ●●

    ●●

    ●●

    ●●●●●●●●

    ●●●●

    ●●

    ●●

    ●●●

    ●●●●●●●●●●●

    ●●

    ●●●●●●●●●●●●●●

    ●●

    ●●

    M26.06.57.07.5

    ●●●●●●

    ●●●●●●●●●

    ●●●

    ●●●●●●●●●●

    ●●

    ●●●●●●●

    ●●●●●

    ●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●

    P

    ●●●●●●●●●●●●●●●●●●●●●

    ●●

    ●●●●●●●●●●●●

    ●●●

    ●●

    ●●●●●●●●●

    ●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●

    R1

    ●●●●●●●●●

    ●●●●●●●●●●●●

    ●●●●

    ●●●●●●●●●●

    ●●●●●●●

    ●●●

    ●●●●●●

    ●●●●●●

    ●●●●●●●●●●●●

    ●●●●●

    ●●

    R2

    ●●●●

    ●●●

    ●●●●●

    ●●

    ●●●●

    ●●●●●●●●●●

    ●●●●●

    ●●●●●●

    ●●●●●●●●●●●●●●●●●

    ●●●●●

    ●●

    ●●●●●

    ●●●●●

    R3

    ●●●●●●●●●

    ●●●●

    ●●

    ●●●●

    ●●●

    ●●●●●●

    ●●●●●●●●●●●●

    ●●●●●●●

    ●●●●●●●●●●●●●●●●●●

    ●●●●●●●

    S

    ●●●

    ●●●●●●●

    ●●

    ●●●

    ●●●●●●●●

    ●●●●●

    ●●●●●

    ●●●

    ●●●●●●●●

    ●●●

    ●●●●●●●●●●●●●●●

    ●●●●

    ●●●●●●●●

    ●●

    T1

    ●●

    ●●●●●●

    ●●●●●●●●

    ●●●●●●●●●●

    ●●

    ●●●●●●

    ●●●

    ●●●

    ●●●●●●●●●●●●●

    ●●●●●●●●●

    ●●●

    ●●●●

    ●●

    T2

    ●●

    ●●

    ●●●●●●●●●●●●●

    ●●

    ●●

    ●●●●

    ●●●●●●●●●●●

    ●●

    ●●●●●●●●●

    ●●●●●●

    ●●●●●●

    ●●●

    ●●●●●●●●

    ●●●

    V

    ●●●●●●●

    ●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●

    W1

    6.06.57.07.5

    ●●●●●●●●

    ●●●

    ●●●●●●●●●●

    ●●●●●●●

    ●●

    ●●●●

    ●●

    ●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●

    ●●

    ●●●●●●

    W26.06.57.07.5

    ●●●●●●●●●

    ●●●●●●●●●

    ●●●●●●

    ●●

    ●●●

    ●●●●●●

    ●●●●

    ●●

    ●●

    ●●●●●

    ●●●●●●

    ●●●●●●●

    ●●●

    ●●●●

    ●●

    Z

    > xylowess.fnc(RT ~ Trial | Subject,> type = c("g", "smooth"), data = lexdec)

    → not too much variance.I random effect inclusion test via ymodel comparison

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Data exploration

    Transformation

    Coding

    Centering

    Interactions and modelingof non-linearities

    Collinearity

    What is collinearity?

    Detecting collinearity

    Dealing with collinearity

    Model Evaluation

    Reporting themodel

    Discussion

    Understanding input variablesI Explore:

    I correlations between predictors (ycollinearity).I non-linearities may become obvious (lowess).

    RT

    2 3 4 5 6 7 8

    ●● ●

    ● ●●

    ● ●

    ●●

    ●●

    ● ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●●●

    ●●

    ●●● ●

    ●●●●

    ●● ●

    ●●

    ●●

    ●● ●

    ●●

    ●●●

    ●●●

    ●●

    ●●

    ● ●●

    ●● ●

    ●● ●

    ● ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●● ●

    ●●●

    ●●●

    ●● ●

    ●●

    ●● ●●

    ●●● ●

    ● ● ●

    ●●

    ● ●●●●

    ● ● ●●

    ●●●

    ● ●●

    ●●●● ●

    ● ●

    ●●

    ●●

    ●●

    ●● ●

    ●●

    ●●

    ●●

    ●●

    ● ●●

    ●●

    ●● ●●●

    ●●

    ● ●

    ●● ● ●

    ●●

    ●● ●● ●●

    ●●

    ●●

    ●●

    ●●

    ● ●

    ●●

    ●●

    ●●●●

    ●● ●●

    ●●●●

    ● ●

    ●● ●

    ●●

    ●●

    ●●

    ●●● ●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●

    ●●●

    ●●●

    ●●

    ●●●

    ●●

    ●● ●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●● ●

    ●● ●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ● ● ●

    ●●

    ● ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●● ●●

    ●●

    ●●

    ●●

    ●● ●

    ●●●●

    ●●

    ●●

    ●● ●

    ●●

    ● ●

    ●●

    ●●

    ●● ●●

    ●● ●●

    ●●●

    ●●

    ● ●

    ● ●●

    ● ●

    ●●

    ●●

    ●●●

    ● ●●●

    ●●●●

    ● ●

    ●●

    ●●

    ● ●●

    ●●

    ●●

    ●●

    ●●●●●●

    ●● ●

    ●●

    ●●

    ● ●● ●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●●

    ● ●●●

    ● ●●●

    ●●● ●

    ●●

    ●●

    ●●●● ●

    ●●

    ●●●

    ●●

    ●● ●

    ●●

    ●●

    ●●

    ●● ●

    ●●

    ●●

    ●●

    ●● ●

    ●●

    ●●●●

    ●●●

    ●●

    ●●

    ● ●

    ●●● ●

    ●●

    ● ● ●

    ●●● ●

    ●●

    ●●●

    ● ●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●● ●●

    ●●

    ●●●

    ●●

    ●●

    ●●●●

    ●●

    ● ●

    ●● ●●●

    ●●

    ●●

    ●● ●●

    ●●

    ●●

    ●● ●●

    ●●

    ●●

    ●● ●

    ● ●

    ●●

    ●● ●

    ●● ●●

    ●● ●

    ●●

    ●●●

    ● ●

    ●●● ●

    ●●

    ●●●●

    ● ●●

    ●●●

    ●●●●

    ●● ● ●● ●

    ●●●

    ● ●●●●

    ●●

    ●●

    ●●

    ● ●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ● ● ●●

    ● ●

    ●●

    ●●

    ●●●

    ● ● ●●

    ●●●

    ●●

    ● ●● ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ● ●

    ●●

    ●● ●

    ●●

    ●● ●

    ●●●

    ●●

    ● ● ●

    ● ●●

    ●● ●● ●● ●●

    ●●

    ● ●

    ●●

    ●●

    ●●●

    ●●

    ●●● ●

    ● ●●

    ●●●

    ● ●●●

    ● ●

    ● ●

    ●●

    ●●

    ●●

    ●● ●

    ●●

    ● ●●

    ●● ●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ● ●

    ●● ●

    ●●● ●●

    ●●

    ●●

    ●●

    ●●

    ●● ● ●

    ●●

    ●●

    ●●

    ● ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●● ●

    ●●

    ●●

    ●●

    ●●

    ●●

    ● ●

    ● ●●

    ●● ●

    ●●

    ●●●

    ● ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ● ●

    ● ●

    ●●

    ●●

    ●●

    ●● ●

    ●●

    ●● ●●

    ●●

    ●●

    ●●

    ●●

    ● ●

    ● ●

    ●●

    ● ●●● ●

    ● ●●●●●

    ●●● ●●

    ●●

    ● ● ●●

    ●●

    ●●

    ●●●

    ●●● ●

    ●●● ●

    ●●

    ●●

    ● ●●●

    ●●

    ●●●

    ●●

    ● ●●●● ● ●●

    ●●●●●●

    ●●●

    ●●

    ● ●●●

    ●●

    ●●● ●

    ●●

    ●●●

    ● ● ●●

    ●● ●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●● ●

    ●● ●● ●●

    ●●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●● ●

    ● ●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●●

    ●●●

    ●●●●●●●●

    ●●

    ●●●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●●●●●

    ●●●

    ●●●

    ●●

    ●●

    ●●●●

    ●●●

    ●●●●●

    ●●●●

    ●●●●●●

    ●●●●

    ●●●●

    ●●●●

    ●●●●

    ●●●

    ●●●●●●

    ●●●●

    ●●●

    ●●●●●●

    ●●

    ●●●●

    ●●●

    ●●●

    ●●●●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●●

    ●●

    ●●

    ●●●●

    ●●

    ●●●●●●

    ●●

    ●●

    ●●

    ●●●●

    ●●●●

    ●●●●●●●●

    ●●●●

    ●●

    ●●●●●

    ●●●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●●

    ●●●

    ●●●●

    ●●

    ●●●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●●●●

    ●●●●●

    ●●

    ●●●

    ●●

    ●●●

    ●●●

    ●●●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●●

    ●●●●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●●

    ●●●●●●

    ●●

    ●●●●●

    ●●●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●

    ●●●●●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●●●●●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●

    ●●

    ●●●●●●

    ●●●●●

    ●●

    ●●●●

    ●●●●●●

    ●●●●●●●●●

    ●●●●●

    ●●●●

    ●●●●●●

    ●●●●●●●

    ●●●●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●●●●

    ●●

    ●●

    ●●●●

    ●●

    ●●●

    ●●●●

    ●●

    ●●●●●

    ●●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●●●

    ●●

    ●●●●●●

    ●●●

    ●●●●

    ●●●●

    ●●●●●

    ●●●

    ●●●●●●

    ●●

    ●●●●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●●

    ●●●●●●●●

    ●●●●●●

    ●●

    ●●●●●●

    ●●●●

    ●●●

    ●●●

    ●●●●●

    ●●●●●●

    ●●●

    ●●●●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●●●●●

    ●●

    ●●●●

    ●●

    ●●●

    ●●

    ●●●

    ●●●●

    ●●●●

    ●●

    ●●●●●●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●●

    ●●●

    ●●●

    ●●

    ●●●

    ●●●

    ●●●●●●●●

    ●●●

    ●●

    ●●

    ●●

    ●●●●●

    ●●●●●

    ●●●

    ●●●

    ●●●●●

    ●●

    ●●

    ●●●

    ●●●●

    ●●●●

    ●●

    ●●●

    ●●●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●●●●

    ●●

    ●●●●

    ●●●●●●

    ●●●●

    ●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●●●●

    ●●●●●●

    ●●

    ●●●●●●

    ●●

    ●●

    ●●●

    ●●

    ●●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●●

    ●●●●●●

    ●●●●●

    ●●

    ●●●●

    ●●

    ●●●●●●●●●

    ●●●●

    ●●●●

    ●●●●

    ●●●●●

    ●●●●●●●●●●●

    ●●●●●●

    ●●●

    ●●●●●●

    ●●●

    ●●●●

    ●●●●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●●

    ●●●●●●●●●●●●●●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●●

    ●●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    1.0 1.4 1.8

    6.0

    6.5

    7.0

    7.5

    ●●●

    ●●●

    ●●

    ●●

    ●●

    ●●●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●●

    ●●●

    ●●●●●●●●

    ●●

    ●●●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●●●●●

    ●●●

    ●●●●●

    ●●

    ●●●●

    ●●●

    ●●●●●●

    ●●●●

    ●●●●●●

    ●●●●

    ●●●●

    ●●●●

    ●●●●

    ●●●

    ●●●●●●●

    ●●●●

    ●●●

    ●●●●●●●●

    ●●●●

    ●●●

    ●●●

    ●●●●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●●

    ●●

    ●●

    ●●●●●●

    ●●●●●●

    ●●

    ●●

    ●●

    ●●●●

    ●●●●

    ●●●●●●● ●

    ●●●●

    ●●

    ●●●●●

    ●●●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●●●

    ●●●●●

    ●●●

    ●●●●

    ●●

    ●●●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●●●●

    ●●●●●

    ●●

    ●●●

    ●●

    ●●●

    ●●●

    ●●●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●●

    ●●●●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●●

    ●●●●●●

    ●●

    ●●●●●

    ●●●●

    ●●●●

    ●●●●●

    ●●

    ●●

    ●●●●●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●●●●●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●

    ●●●●●●●●●●●●●

    ●●

    ●●●●

    ●●●●●●

    ●●●●●●●●●

    ●●●●●

    ●●●●

    ●●●●●●

    ●●●●●●●

    ●●●●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●●●●

    ●●

    ●●

    ●●●●

    ●●

    ●●●

    ●●●●

    ●●

    ●●●●●

    ●●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●●●

    ●●

    ●●●●●●

    ●●●

    ●●●●

    ●●●●

    ●●●●●

    ●●●

    ●●●●●●

    ●●

    ●●●●●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●●

    ●●●●●●●●

    ●●●●●●

    ●●

    ●●●●●●

    ●●●●

    ●●●

    ●●●

    ●●●●●

    ●●●●●●●

    ●●●

    ●●●●●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●●●●●

    ●●

    ●●●●

    ●●

    ●●●

    ●●

    ●●●

    ●●●●

    ●●●●

    ●●

    ●●●●●●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●●

    ●●●

    ●●●

    ●●

    ●●●

    ●●●

    ●●●●●●●●●●●

    ●●

    ●●

    ●●

    ●●●●●

    ●●●●●

    ●●●

    ●●●

    ●●●●●

    ●●

    ●●

    ●●●

    ●●●●

    ●●●●

    ●●

    ●●●

    ●●●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●●●●

    ●●

    ●●●●

    ●●●●●●●●●●

    ●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●●●●

    ●●●●●●●

    ●●

    ●●●●●●

    ●●

    ●●

    ●●●

    ●●

    ●●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●●

    ●●●●●●

    ●●●●●

    ●●

    ●●●●

    ●●

    ●●●●●●●●●

    ●●●●

    ●●●●

    ●●●●

    ●●●●●

    ●●●●●●●●●●●

    ●●●●●●

    ●●●

    ●●●●●●

    ●●●

    ●●●●●●●●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●●

    ●●●●●●●●●●●●●●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●●

    ●●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    23

    45

    67

    8

    r = −0.23

    p = 0

    rs = −0.23

    p = 0

    Frequency

    ●●●●

    ●●

    ●●

    ●●

    ●●●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●●●

    ●●●●●●

    ●●●●

    ●●

    ●●●

    ●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●

    ●●

    ●●

    ●●●

    ●●●

    ●●

    ●●●

    ●●

    ●●●

    ●●

    ●●

    ●●●●

    ●●

    ●●

    ●●●

    ●●●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●

    ●●●

    ●●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●●●

    ●●●●●●

    ●●●●

    ●●

    ●●●

    ●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●

    ●●

    ●●

    ●●●

    ●●●●

    ●●

    ●●

    ●●●

    ●●●

    ●●

    ●●●

    ●●

    ●●●

    ●●

    ●●

    ●●●●

    ●●

    ●●

    ●●●

    ●●●●

    ●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●●

    ●●●

    ●●●

    ●●●

    ●●●●

    ●●

    ●●

    ●●

    ●●

    r = −0.06

    p = 0.015

    rs = −0.05

    p = 0.037

    r = 0

    p = 0.9076

    rs = 0

    p = 0.8396

    Trial

    5010

    015

    0

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

    6.0 6.5 7.0 7.5

    1.0

    1.4

    1.8 r = 0.32

    p = 0

    rs = 0.32

    p = 0

    r = 0

    p = 1

    rs = 0

    p = 1

    50 100 150

    r = −0.01

    p = 0.5929

    rs = −0.01

    p = 0.5966

    NativeLanguage

    > pairscor.fnc(lexdec[,c("RT", "Frequency", "Trial", "NativeLanguage")])

  • Issues andSolutions inRegressionModeling

    Florian Jaeger,Victor Kuperman

    Sample Data andSimple Models

    Building aninterpretablemodel

    Data exploration

    Transformation

    Coding

    Centering

    Interactions and modelingof non-linearities

    Collinearity

    What is collinearity?

    Detecting collinearity

    Dealing with collinearity

    Model Evaluation

    Reporting themodel

    Discussion

    Non-linearities

    I Consider Frequency (already log-transformed inlexdec) as predictor of RT:

    ●●

    ●●

    ●●

    ●●

    ●●

    ●●