class: center, middle, inverse, title-slide .title[ # Measurement ] .author[ ### S. Mason Garrison ] --- layout: true <div class="my-footer"> <span> <a href="https://psychmethods.github.io/coursenotes/" target="_blank">Methods in Psychological Research</a> </span> </div> --- class: middle # Measurement: The Foundation of Scientific Research --- ## Roadmap - Measurement - Levels of measurement - Goals of measurement --- ## Understanding Measurement - Definition: Measurement is the assignment of numbers to characteristics of people or objects - 4th step in the research process - It's purpose is to describe and differentiate -- - Examples: measurement scales - Speed `\(\rightarrow\)` miles-per-hour - Temperature `\(\rightarrow\)` Kelvin (K) - Order of finishers in a race `\(\rightarrow\)` 1st, 2nd, 3rd, etc. - Numbers on the back of basketball jerseys `\(\rightarrow\)` 28, 156, 152, 156, 215 --- ## Variables: The Building Blocks of Measurement - Variables contain the outcome of measurement processes -- - Variables can be: - Qualitative: - Numbers represent qualities (not quantities) - Example: Coding for eye color (1 = Blue, 2 = Brown, 3 = Green) -- - Quantitative: - Numbers mean something in relation quantities in the real world - Example: Height in centimeters, Weight in kilograms --- class: middle # Levels of Measurement --- ## Stevens' Classification (1946): .pull-left[ - Characterizes each level of measurement - Nominal - ordinal, - interval, - ratio ] -- .pull-right[ - Key Properties: - Identity - Order - Equal Intervals - Absolute Zero ] -- .footnote[Stevens, Stanley Smith (1946). On the theory of scales of measurement. Science, 103(2684), 677-680.] <img src="data:image/png;base64,#https://upload.wikimedia.org/wikipedia/en/2/2b/Headshot_of_Stanley_Smith_Stevens.png" width="15%" style="display: block; margin: auto auto auto 0;" /> --- ## Key Properties of Measurement - Have absolute zero - 0 indicated absence (origin means zero) - Equal intervals - An interval means the same value at any point on measurement scales - Order - Number means order - Identity - Different numbers mean different measurement outcomes `\((1 \neq 2)\)` --- ## Which properties does this measure have? <img src="data:image/png;base64,#../img/equalinterval.jpeg" width="65%" style="display: block; margin: auto;" /> -- .footnote[Source: [/u/ZigeonVO](https://www.reddit.com/user/ZigeonVO) via [r/assholedesign](https://www.reddit.com/r/assholedesign/comments/1fc7cnt/this_card_i_was_given_today_from_a_delivery/)] --- # Ratio (quantitative) - All four properties - Have absolute zero - Equal intervals - Order - Identity -- - Multiplication and division are permissible transformations -- - Examples: - Height, weight, age, income, time, etc. --- # Example (Base R) ``` r # loads the HistData package library(HistData) # loads the Galton dataset data("Galton") # First 3n rows of data head(Galton, n=3) ``` ``` ## parent child ## 1 70.5 61.7 ## 2 68.5 61.7 ## 3 65.5 61.7 ``` --- # Example (Base R) .pull-left[ <img src="data:image/png;base64,#measurement_files/figure-html/unnamed-chunk-5-1.png" width="100%" style="display: block; margin: auto;" /> ] .pull-right[ ``` r # Histogram hist(Galton$child) ``` ] --- # Example (Base R) .pull-left[ <img src="data:image/png;base64,#measurement_files/figure-html/unnamed-chunk-6-1.png" width="100%" style="display: block; margin: auto;" /> ] .pull-right[ ``` r # Density Plot plot(density(Galton$child)) ``` ] --- <!-- should be cut--> # Bandwidth Aside [Bandwidth: Smoothing Method](https://stat.ethz.ch/R-manual/R-devel/library/stats/html/density.html) ``` r args(density.default) ``` ``` ## function (x, bw = "nrd0", adjust = 1, kernel = c("gaussian", ## "epanechnikov", "rectangular", "triangular", "biweight", ## "cosine", "optcosine"), weights = NULL, window = kernel, ## width, give.Rkern = FALSE, subdensity = FALSE, warnWbw = var(weights) > ## 0, n = 512, from, to, cut = 3, ext = 4, old.coords = FALSE, ## na.rm = FALSE, ...) ## NULL ``` ``` r #?density # Gives you documentation ``` --- # Bandwidth Aside <img src="data:image/png;base64,#../img/density.png" width="90%" style="display: block; margin: auto;" /> --- # Bandwidth Aside .pull-left[ <img src="data:image/png;base64,#measurement_files/figure-html/unnamed-chunk-9-1.png" width="100%" style="display: block; margin: auto;" /> ] .pull-right[ ``` r set.seed(201010) x <- rnorm(1000, 10, 2) par(mfrow = c(2,2)) #A bit bumpy plot(density(x)) #Very sooth plot(density(x,adjust = 10)) #Very bumpy plot(density(x,adjust = .1)) ``` ] --- # Interval (quantitative) - Has order, identity, and equal intervals - (all but absolute zero) - Addition is a permissible transformation - Example: Temperature in Celsius or Fahrenheit ``` r # Interval Example library(datasets) data("nottem") nottem[1:10] # First ten rows of data ``` ``` ## [1] 40.6 40.8 44.4 46.7 54.1 58.5 57.7 56.4 54.3 50.5 ``` --- ## Interval (quantitative) .pull-left[ ``` r # Histogram hist(nottem) ``` <img src="data:image/png;base64,#measurement_files/figure-html/unnamed-chunk-11-1.png" width="90%" style="display: block; margin: auto;" /> ] .pull-right[ ``` r # Density Plot plot(density(nottem)) ``` <img src="data:image/png;base64,#measurement_files/figure-html/unnamed-chunk-12-1.png" width="90%" style="display: block; margin: auto;" /> ] --- # Ordinal (qualitative) .pull-left-narrow[ - Has order and identity - Monotonic transformations are permissible - These variables maintain the order of the values - Example: Education levels (High School, Bachelor's, Master's, PhD) ] -- .pull-right-wide[ ``` r # Ordinal Example library(ggplot2movies) data(movies) # First 4 rows of data, with a non-missing budget head(movies[!is.na(movies$budget),], n = 14) ``` ``` ## # A tibble: 14 × 24 ## title year length budget rating votes r1 r2 r3 r4 ## <chr> <int> <int> <int> <dbl> <int> <dbl> <dbl> <dbl> <dbl> ## 1 'G' M… 1935 85 4.50e5 7.2 281 0 4.5 4.5 4.5 ## 2 'Mano… 1966 74 1.9 e4 1.6 7996 74.5 4.5 4.5 4.5 ## 3 'Til … 1997 113 2.3 e7 4.8 799 4.5 4.5 4.5 14.5 ## 4 .com … 2002 96 5 e6 3.7 271 64.5 4.5 4.5 4.5 ## 5 10 Th… 1999 97 1.6 e7 6.7 19095 4.5 4.5 4.5 4.5 ## 6 100 M… 2002 98 1.10e6 5.6 181 4.5 4.5 4.5 4.5 ## # ℹ 8 more rows ## # ℹ 14 more variables: r5 <dbl>, r6 <dbl>, r7 <dbl>, r8 <dbl>, ## # r9 <dbl>, r10 <dbl>, mpaa <chr>, Action <int>, ## # Animation <int>, Comedy <int>, Drama <int>, ## # Documentary <int>, Romance <int>, Short <int> ``` ] --- # Ordinal (qualitative) .pull-left[ ``` r # Histogram variable <- movies$rating hist(variable) ``` <img src="data:image/png;base64,#measurement_files/figure-html/unnamed-chunk-14-1.png" width="90%" style="display: block; margin: auto;" /> ] .pull-right[ ``` r # Density Plot plot(density(variable)) ``` <img src="data:image/png;base64,#measurement_files/figure-html/unnamed-chunk-15-1.png" width="90%" style="display: block; margin: auto;" /> ] --- # Nominal .pull-left-narrow[ - Only has identity - Any identity-preserving transformation is permissible - Example: Jersey numbers in sports ] ``` r # Nominal Example library(vcd) data(Arthritis) head(Arthritis[, c("ID", "Treatment")], 8) ``` ``` ## ID Treatment ## 1 57 Treated ## 2 46 Treated ## 3 77 Treated ## 4 17 Treated ## 5 36 Treated ## 6 23 Treated ## 7 75 Treated ## 8 39 Treated ``` --- # Basic Barplot .pull-left[ <img src="data:image/png;base64,#measurement_files/figure-html/unnamed-chunk-17-1.png" width="100%" style="display: block; margin: auto;" /> ] .pull-right[ ``` r variable<-Arthritis$Treatment #hist(variable) # error barplot_fix <- prop.table(table(variable)) # Sometimes, R is silly barplot(barplot_fix) ``` ] --- # More complex measurement level taxomony - Missing (considered nominal under the Stevens) - Binary (considered nominal under the Stevens) - Nominal (considered nominal under the Stevens) - Partially ordered (considered ordinal under Stevens) - Fully ordered (considered ordinal under Stevens) - Interval - Ratio - Absolute measurement (has no permissible transformation) - `\(6.02\)` x `\(10^{23}\)` - `\(\pi\)` --- ## Could measurement level be itself on a continuum? .pull-left[ - Example: IQ - Falls between interval and ratio? - Or falls between ordinal and interval?  ] -- .pull-right[  ] --- class: center, middle # Goals of Measurement --- # Goals of Measurement - Reliability - "…the degree to which a test or measure produces the same scores when applied in the same circumstances…" (Thomas and Nelson 1996) - In other words, if you take the measure again, will you get the same result? -- - (Internal) Validity - "Degree to which a test or instrument measures what it purports to measure" (Thomas and Nelson 1996) - In other words, does your measure measure what is it supposed to measure? --- ## Types of Validity (More on this later...) - Two Major Areas within Validity - **Internal Validity** - Is this evidence supportive of our claim, within this study? - **External Validity** - Is this evidence supportive of our claim beyond this study? - Does this finding generalize to outside this study? --- ## Practical Applications - Psychology: Measuring personality traits - Education: Assessing student performance - Medicine: Tracking patient vital signs - Business: Evaluating customer satisfaction - Sports: Analyzing athletic performance --- # Challenges in Measurement - Measurement Error - Random errors vs. Systematic errors - Bias in Measurement - Observer bias, response bias, selection bias - Cultural and Linguistic Considerations - Ensuring measures are valid across different cultures and languages - Ethical Considerations - Privacy, consent, and responsible use of data --- ## The Importance of Good Measurement <br><br>  --- # Lingering Questions - How might the level of measurement affect the statistical analyses we can perform? - Can you think of examples where improper measurement could lead to incorrect conclusions? - How can we improve the reliability and validity of our measurements in real-world research? --- class: middle # Wrapping Up...