/
HRP 223 - 2008 HRP 223 - 2008

HRP 223 - 2008 - PowerPoint Presentation

mitsue-stanley
mitsue-stanley . @mitsue-stanley
Follow
382 views
Uploaded On 2017-09-26

HRP 223 - 2008 - PPT Presentation

Topic 8 Analysis of Means Normally Distributed Not Normally Distributed One sample vs population One sample ttest Wilcoxon Signed Rank Two paired samples Paired ttest Difference then Signed Rank ID: 591040

confidence data interval anova data confidence anova interval distribution null samples wide unpaired sample paired cls statistically file significant

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "HRP 223 - 2008" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

HRP 223 - 2008

Topic 8 – Analysis of MeansSlide2

Normally Distributed

Not Normally Distributed

One sample vs. populationOne sample t-testWilcoxon Signed RankTwo paired samplesPaired t-testDifference then Signed RankTwo unpaired samplesT-testWilcoxon Rank-sumThree or more unpaired samplesANOVAKruskal-WallisThree or more paired samplesMixed effectsTransform then mixed model

Normally DistributedNot Normally DistributedOne sample vs. populationDescribe > DistributionDescribe > DistributionTwo paired samplesAnalyze >ANOVA>t-testDescribe > DistributionTwo unpaired samplesAnalyze >ANOVA>t-testDescribe > DistributionThree or more unpaired samplesAnalyze >ANOVA>LinearAnalyze >ANOVA>Nonpar.Three or more paired samplesAnalyze >ANOVA>Mixed

One Categorical PredictorSlide3

Multiple Categorical Predictors

Unpaired samples

ANOVAPaired samplesMixed Effects ModelsIf data is not normally distributedThere are spcialized statistics (Friedman’s test for 2 predictors).Try to transform into normally distributed.Slide4

Mean vs. Expected BMI

It would be nice to see the actual Excel file.Slide5

Adds a link to source

Adds a link to source and runs import wizard

This gives instant access to the current state of the spreadsheet but it is bugged if you mix character and numeric data.Slide6

Take a Look at the DataSlide7

Prior to analysis, do all 3 plots.

Histograms and box plots show outliers and bimodal data but are not ideal for assessing normality.

The formal tests for normality are not great. They will not find problems with small samples and will declare problems with large samples.Slide8
Slide9

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

1

.

2

.

3

.

4

.

5

.

1. normal distribution

2. skewed-to-the-right distribution

3. skewed-to-the-left distribution

4. heavy-tailed distribution

5. light-tailed distribution

Image from: Statistics I: Introduction to ANOVA, Regression, and Logistic Regression: Course Notes. SAS Press 2008.Slide10

Inference 101

You only have one sample but you want to make inferences to the world.

Given what you see in this sample, you can guess what the distribution of samples looks like around the null distribution.Slide11

If the population you are sampling from has a mean of 4, you will not observe a score of 4.

How do you compare this sample vs. another with a mean of 5?

Make a histogram of the meansSlide12

.75/sqrt(1) = .75

.75/sqrt(5) = .34

.75/sqrt(25) = .15Distributions of the MeansSlide13

Precision

Think of the “+/- something” imprecision in the estimates of the political polls.

You typically end up saying you are 95% sure you chose an interval that has the true value inside the range bracketed by the confidence limits (CLs). Either the population value is or is not in the interval between the lower and upper confidence limit, and if you repeated the process on many samples, 95% of such intervals would include the population value. The 99% CI is wider (more accurate) than the more precise 95% CL.Slide14

Confidence Intervals from 10 Samples

Axis with units showing your outcome

You want to set the width of the interval so that in 95% of the experiments, the confidence interval includes the true value.In theory, you tweak the interval and increase or decrease the width.

The unobservable truthSlide15

Benefits of CLs

You have information about the estimate's precision.

The width of the CI tells you about the degree of random error which is set by the confidence interval.Wide intervals indicate poor precision. Plausible values could be across a broad range.Slide16

Estimation vs. Hypothesis Testing

P-value < .05 corresponds to a 95% CL that does not include the null hypothesis value.

CLs show uncertainty, or lack of precision, in the estimate of interest and thus convey more useful information than the p-value.Slide17

CLs vs. p-values

null value

Upper CLLowerCLConfidenceintervalP > .05 and the null value is inside of the confidence limits (CLs)null valueUpper CLLowerCL

ConfidenceintervalP < .05 and the null value is not inside of the confidence limits0 difference between groups or odds ratio of 1Slide18

null value

zone of clinical

indifferenceNot statistically significant and not clinically interesting

Not statistically significant, possibly clinically interestingStatistically significant but not clinically interestingStatistically significant and clinically interestingSlide19
Slide20

Compare Two Teachers

Import the data

Describe the data Assign the method as a classification variableDo an unpaired T-testDo a one-way ANOVA with the predictor having only two levelsSlide21
Slide22
Slide23
Slide24
Slide25

SS total is the sum of the distance between each point and the overall mean line squared.

SS error is the sum of the total squared distances between each point and the group mean lines.Slide26
Slide27
Slide28
Slide29

Psoriasis

Scores are arbitrary numbers 0 = < 0% response, 5 = 26-50% response, etc.Slide30
Slide31
Slide32

If and only if you work on a fast machine!Slide33

Weight GainSlide34
Slide35
Slide36
Slide37
Slide38
Slide39
Slide40
Slide41
Slide42

Postpartum DepressionSlide43

After the FormatsSlide44
Slide45
Slide46
Slide47
Slide48
Slide49

DementiaSlide50
Slide51
Slide52
Slide53
Slide54

Wide to Long

You may have noticed that the data for these analyses are all set up as long, skinny files where there is a record for every observation on a patient. Some people store data as wide records with many variables with a single record for each person.

To convert from wide to long:Do data step processing with arrays. Use the Transpose option on the Data menu.Combine proc transpose and data step code.Use a macro I wrote. (It is brand new, so check it.)Slide55

Tolerance.sas7bdat is dataset from the book

Save a copy of the macro in a file after the fill in the blanks are done.Slide56

The stuff in the blah.sas file:

The stuff in the macro file:Slide57

tol

:

all variables starting with the letters tolSlide58

Narrow to Wide

Of course you can transpose back to wide from narrow.

If you download the keyboard macros today you will see that proc transpose now gives you a code template.