Non-Parametric Analysis Stata codes

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/30

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

31 Terms

1
New cards

Which test checks for equal variance between two groups in Stata?

robvar dv, by(iv)

2
New cards

What is the command for an independent samples t-test in Stata?

ttest dv, by(iv)

3
New cards

What non-parametric test should you run if equal variance is violated in an independent t-test?

Wilcoxon-Mann-Whitney Rank-Sum Test: ranksum iq, by(dropout)

4
New cards

How should you interpret the result of a Mann-Whitney U test?

There is a significant difference in the distribution of the dependent variable between the two groups.

5
New cards

What command creates a new variable showing the difference between GPA and GPA2?

gen gpa_diff = gpa - gpa2

6
New cards

What is the Stata command for a paired t-test?

ttest gpa = gpa2

7
New cards

What non-parametric test is used instead of a paired t-test if normality is violated?

Wilcoxon Signed-Rank Test: signrank gpa = gpa2

8
New cards

How should you interpret the Wilcoxon Signed-Rank Test?

There is a significant difference in the median paired values.

9
New cards

What command runs a one-way ANOVA on sperm count by soy meal group?

oneway spcount smeal

10
New cards

What non-parametric test is used when ANOVA assumptions are violated?

Kruskal-Wallis Test: kwallis spcount, by(smeal)

11
New cards

What is the follow-up post-hoc test after a Kruskal-Wallis test?

dunntest spcount, by(smeal) ma(bonferroni)

12
New cards

What are the key assumptions of a t-test?

  • Normal distribution of DV in each group

  • Homogeneity of variance (for independent t-test)

13
New cards

What does the Kruskal-Wallis test compare?

Differences in the distributions of the DV across 3+ groups (ordinal/ranked data)

14
New cards

What Stata command checks the distribution of a numeric variable?

histogram variable, normal

15
New cards

What is the Stata command to test for normality of IQ in students who dropped out?

sktest iq if dropout == 1

16
New cards

Section 1: Two Groups - When do you use the Wilcoxon-Mann-Whitney U test?

When comparing two independent groups where the DV is not normally distributed or data is ordinal. It's the non-parametric equivalent of the independent t-test.

17
New cards

Section 1: Two Groups - What is the non-parametric alternative to an independent t-test?

Wilcoxon-Mann-Whitney U test (or rank sum test).

18
New cards

Section 1: Two Groups - When do you use the Wilcoxon Signed-Rank test?

When comparing two related groups (e.g., pre-post measures) where the differences are not normally distributed.

19
New cards

Section 1: Two Groups - What non-parametric test is used instead of a paired samples t-test?

Wilcoxon Signed-Rank test.

20
New cards

Section 1: Two Groups - What is the Sign Test used for?

To evaluate the direction of change in paired data when you can't assume normality, even weaker assumptions than Wilcoxon.

21
New cards

Section 2: More Than Two Groups - When do you use the Kruskal-Wallis H test?

To compare 3 or more independent groups when the DV is not normally distributed. Non-parametric equivalent of one-way ANOVA.

22
New cards

Section 2: More Than Two Groups - What is the non-parametric alternative to one-way ANOVA?

Kruskal-Wallis test.

23
New cards

Section 2: More Than Two Groups - When do you use the Friedman Test?

To compare 3 or more related (repeated measures) groups when the data doesn't meet ANOVA assumptions.

24
New cards

Section 2: More Than Two Groups - What is the non-parametric equivalent of repeated measures ANOVA?

Friedman test.

25
New cards

Section 2: More Than Two Groups - When is Dunn’s test used?

As a post-hoc test after a significant Kruskal-Wallis result, to identify which groups differ. Can be adjusted using Bonferroni.

26
New cards

Section 3: Categorical Data & Associations - What is the Chi-square test used for?

To test the association between two categorical variables in a contingency table.

27
New cards

Section 3: Categorical Data & Associations - When do you use Fisher’s Exact Test instead of Chi-square?

When sample sizes are small or expected frequencies in cells are < 5.

28
New cards

Section 3: Categorical Data & Associations - What does McNemar’s test examine?

It tests changes in paired binary/categorical responses, often used in before-and-after studies.

29
New cards

Section 4: Correlations - When do you use Spearman’s Rank Correlation? -

When data is ordinal, non-linear, or not normally distributed. Measures strength and direction of monotonic relationships.

30
New cards

Section 4: Correlations - What is the non-parametric version of Pearson’s correlation? -

Spearman’s rho or Kendall’s tau.

31
New cards

Section 4: Correlations - What is Kendall’s Tau used for?

To measure ordinal association, especially with small samples or many tied ranks.