Intro to NHANES & Sampling Kaelen Medeiros Product Data - - PowerPoint PPT Presentation

intro to nhanes sampling
SMART_READER_LITE
LIVE PREVIEW

Intro to NHANES & Sampling Kaelen Medeiros Product Data - - PowerPoint PPT Presentation

DataCamp Experimental Design in R EXPERIMENTAL DESIGN IN R Intro to NHANES & Sampling Kaelen Medeiros Product Data Scientist at DataCamp DataCamp Experimental Design in R Intro to NHANES dataset NHANES = National Health and Nutrition


slide-1
SLIDE 1

DataCamp Experimental Design in R

Intro to NHANES & Sampling

EXPERIMENTAL DESIGN IN R

Kaelen Medeiros

Product Data Scientist at DataCamp

slide-2
SLIDE 2

DataCamp Experimental Design in R

Intro to NHANES dataset

NHANES = National Health and Nutrition Examination Survey Conducted by the National Center for Health Statistics (NCHS), a division of the Centers for Disease Control (CDC) Data collected a variety of ways, including interviews & a physical exam Questions cover medical, dental, socioeconomic, dietary, and general health- related conditions

slide-3
SLIDE 3

DataCamp Experimental Design in R

Intro to Sampling

Probability Sampling: probability is used to select the sample (in various ways) Non-probability Sampling: probability is not used to select the sample Voluntary response: whoever agrees to respond is the sample Convenience sampling: subjects convenient to the researcher are chosen.

slide-4
SLIDE 4

DataCamp Experimental Design in R

Sampling

Simple Random Sampling (SRS) Stratified Sampling Cluster Sampling Systematic Sampling Multi-stage Sampling

sample() dataset %>% group_by(strata_variable) %>% sample_n() cluster(dataset, cluster_var_name, number_to_select, method = "option")

slide-5
SLIDE 5

DataCamp Experimental Design in R

Let's practice!

EXPERIMENTAL DESIGN IN R

slide-6
SLIDE 6

DataCamp Experimental Design in R

Randomized Complete Block Designs

EXPERIMENTAL DESIGN IN R

Kaelen Medeiros

Product Data Scientist at DataCamp

slide-7
SLIDE 7

DataCamp Experimental Design in R

RCBDs

Randomized - the treatment is assigned randomly inside each block Complete - each treatment is used the same number of times in every block Block - experimental groups are blocked to be similar (e.g. by sex) Design - this is your experiment!

slide-8
SLIDE 8

DataCamp Experimental Design in R

RCBD Workflow

slide-9
SLIDE 9

DataCamp Experimental Design in R

agricolae

library(agricolae) trt <- letters[1:4] rep <- 4 design.rcbd <- design.rcbd(trt, r = rep, seed = 42, serie = 0) design.rcbd$sketch [,1] [,2] [,3] [,4] [1,] "d" "c" "a" "b" [2,] "b" "a" "d" "c" [3,] "d" "a" "b" "c" [4,] "a" "b" "d" "c"

slide-10
SLIDE 10

DataCamp Experimental Design in R

Let's practice!

EXPERIMENTAL DESIGN IN R

slide-11
SLIDE 11

DataCamp Experimental Design in R

Balanced Incomplete Block Designs (BIBD)

EXPERIMENTAL DESIGN IN R

Kaelen Medeiros

Product Data Scientist at DataCamp

slide-12
SLIDE 12

DataCamp Experimental Design in R

Balanced Incomplete Block Designs

Balanced - each pair of treatments occur together in a block an equal number of times Incomplete - not every treatment will appear in every block Block - experimental groups are blocked to be similar (e.g. by sex) Design - this is your experiment!

slide-13
SLIDE 13

DataCamp Experimental Design in R

Is there a BIBD?

Let: t = # of treatments k = # of treatments per block r = # replications λ = r × t − 1 (k − 1)

slide-14
SLIDE 14

DataCamp Experimental Design in R

BIBD examples (1)

λ = r × t − 1 (k − 1)

λ = 2 * (2-1) / 4-1 λ = 2/3 = 0.667

slide-15
SLIDE 15

DataCamp Experimental Design in R

Invalid BIBD

slide-16
SLIDE 16

DataCamp Experimental Design in R

BIBD examples (2)

λ = r × t − 1 (k − 1)

λ = 3 * (3-1) / 4-1 λ = 6/3 = 2

slide-17
SLIDE 17

DataCamp Experimental Design in R

Valid BIBD

slide-18
SLIDE 18

DataCamp Experimental Design in R

Let's practice!

EXPERIMENTAL DESIGN IN R