OLD Paired t-test Richard Erickson Quantitative Ecologist DataCamp - - PowerPoint PPT Presentation

old paired t test
SMART_READER_LITE
LIVE PREVIEW

OLD Paired t-test Richard Erickson Quantitative Ecologist DataCamp - - PowerPoint PPT Presentation

DataCamp Hierarchical and Mixed Effects Models in R HIERARCHICAL AND MIXED EFFECTS MODELS IN R OLD Paired t-test Richard Erickson Quantitative Ecologist DataCamp Hierarchical and Mixed Effects Models in R Repeated measures Follow same unit


slide-1
SLIDE 1

DataCamp Hierarchical and Mixed Effects Models in R

OLD Paired t-test

HIERARCHICAL AND MIXED EFFECTS MODELS IN R

Richard Erickson

Quantitative Ecologist

slide-2
SLIDE 2

DataCamp Hierarchical and Mixed Effects Models in R

Repeated measures

Follow same unit of study through time e.g., cohort of students, individuals More powerful because of individual-level variability observed

slide-3
SLIDE 3

DataCamp Hierarchical and Mixed Effects Models in R

Paired t-test

Special case of a t-test Example of change in test scores pre- and post-intervention Nice conceptual introduction to repeated measures

slide-4
SLIDE 4

DataCamp Hierarchical and Mixed Effects Models in R

Paired t-test in R

t.test(x1, x2, paired = TRUE)

slide-5
SLIDE 5

DataCamp Hierarchical and Mixed Effects Models in R

Repeated measures ANOVA

Conceptual extension of paired t-test Tests if means are constant across time Example of change in student test-scores with >2 tests

slide-6
SLIDE 6

DataCamp Hierarchical and Mixed Effects Models in R

Repeated measures in R

library(lmerTest) anova(lmer(y ~ time + (1|individual))

slide-7
SLIDE 7

DataCamp Hierarchical and Mixed Effects Models in R

Extension to lmer and glmer

Repeated measures a special type of mixed-effect Can be applied to glmer as well Powerful additional use of tool Degrees of freedom is an open research method

slide-8
SLIDE 8

DataCamp Hierarchical and Mixed Effects Models in R

Let's practice!

HIERARCHICAL AND MIXED EFFECTS MODELS IN R

slide-9
SLIDE 9

DataCamp Hierarchical and Mixed Effects Models in R

Sleep study

HIERARCHICAL AND MIXED EFFECTS MODELS IN R

Richard Erickson

Quantitative Ecologist

slide-10
SLIDE 10

DataCamp Hierarchical and Mixed Effects Models in R

Overview of sleep study

Two soporific drugs 10 patients Classic dataset used by "Student"

slide-11
SLIDE 11

DataCamp Hierarchical and Mixed Effects Models in R

Research question

ANOVA type analysis: H : Drug type term does not explain a significant amount of variability H : Drug type term explains a significant amount of variability Regression coefficient approach H : Drug type term is zero H : Drug type term is not zero

a a

slide-12
SLIDE 12

DataCamp Hierarchical and Mixed Effects Models in R

Modeling approach

Visualize data Build simple model Build model of interest Extract information of interest Visualize results

slide-13
SLIDE 13

DataCamp Hierarchical and Mixed Effects Models in R

Let's practice!

HIERARCHICAL AND MIXED EFFECTS MODELS IN R

slide-14
SLIDE 14

DataCamp Hierarchical and Mixed Effects Models in R

Hate in NY state?

HIERARCHICAL AND MIXED EFFECTS MODELS IN R

Richard Erickson

Quantitative Ecologist

slide-15
SLIDE 15

DataCamp Hierarchical and Mixed Effects Models in R

Overview of data

Data from Collected by New York State Includes county, year, crime type (against property or person), and group targeted Data.gov

slide-16
SLIDE 16

DataCamp Hierarchical and Mixed Effects Models in R

Questions with data

Is the state-wide number of hate crimes changing? Are the number of hate crimes changing differently in each county?

slide-17
SLIDE 17

DataCamp Hierarchical and Mixed Effects Models in R

Know your target audiences

Technical details Figures versus tables

slide-18
SLIDE 18

DataCamp Hierarchical and Mixed Effects Models in R

Presenting for "pop" audiences

Narrative important Avoid bogged down with details

slide-19
SLIDE 19

DataCamp Hierarchical and Mixed Effects Models in R

Presenting for scientific audiences

Reproducibility Technical details Code Match style of your field

slide-20
SLIDE 20

DataCamp Hierarchical and Mixed Effects Models in R

Let's practice!

HIERARCHICAL AND MIXED EFFECTS MODELS IN R

slide-21
SLIDE 21

DataCamp Hierarchical and Mixed Effects Models in R

Conclusion

HIERARCHICAL AND MIXED EFFECTS MODELS IN R

Richard Erickson

Quantitative Ecologist

slide-22
SLIDE 22

DataCamp Hierarchical and Mixed Effects Models in R

Happy coding!

HIERARCHICAL AND MIXED EFFECTS MODELS IN R