0% found this document useful (0 votes)
3 views4 pages

Notes from Labs on R

The document outlines key R functions for data analysis, such as 'attach', 'order', and 'aggregate', and discusses the importance of the null hypothesis in scientific research. It emphasizes the criteria for a good scientific question and theory, including testability, causal explanations, and empirical evidence. Additionally, it covers research design principles, measurement concepts, variable types, and statistical methods, including regression and multicollinearity.

Uploaded by

gthh9m42pj
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Notes from Labs on R

The document outlines key R functions for data analysis, such as 'attach', 'order', and 'aggregate', and discusses the importance of the null hypothesis in scientific research. It emphasizes the criteria for a good scientific question and theory, including testability, causal explanations, and empirical evidence. Additionally, it covers research design principles, measurement concepts, variable types, and statistical methods, including regression and multicollinearity.

Uploaded by

gthh9m42pj
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

💭
🔍
🔸
Labs – Key R Functions to Review:
● attach(data): lets you call variables directly without data$var structure
order(): sorts data
2

● aggregate(): summarizes data by group (e.g., means per category)
table(): counts frequencies (e.g., table(regime_type))
1

NULL HYPOTHESIS & SCIENTIFIC THINKING


Null Hypothesis
○ Scientists favor the null hypothesis to avoid false positives (Type I
6
errors)
5
○ Null = no effect, no relationship
◆ Ex: “Incumbents do not perform better when the economy is

good.”
Theory vs. Hypothesis
○ Theory = general explanation
4
○ Hypothesis = specific, testable claim derived from a theory
What Makes a Scientific Question?
○ Must be testable, falsifiable, and based on observable evidence
3
◆ Ex: “What are the causes of war?” = scientific
◆ “Does God exist?” = not testable → not scientific
2
What Makes a Good Theory
1
. Causal: Explains how X influences Y (must show a process or
mechanism)
. Not driven from data: don’t allow data alone to drive your theories (like
murder rate in Houston by months)
. Only consider Empirical Evidence: logical theories must be backed up
by rigorous tests; empirical evidence, not ideology, party id, or
metaphysics
. No ideology or normative statements: “we want to get rid of wars /
homelessness / our favorite candidate to win elections” (what are the
causes of wars? What are the reasons behind homelessness? Are
examples of scientific questions).
. Generality: The theory can be applied across multiple cases or settings.
. Parsimonious: Uses the fewest assumptions possible; simple theory.
Also passes rigorous evaluation process and contributes to scientific knowledge.
How to build such a theory? - there is no clear cut formula.

3 Strategies to Build a Theory


. Propose a new Y (with an existing X)
– Rarest and possibly the most creative
. An existing Y and a new X
3
– New independent variable, building new explanations for existing
phenomena (Standing on the Shoulders of Giants)
. Introduce a new Z which modifies an established X —> Y
– X —> Y could be different across different time periods, different
types of individuals, or different geographic contexts.

Does economic voting apply in other democracies?


– No

Research Design
● Definition: A framework for testing theories by examining relationships
between variables using systematic methods.
● Goal: To test a theory against the 4 Causal Hurdles:
. Is there a credible causal mechanism connecting X to Y?
. Can you rule out Y → X (reverse causality)?
. Is there covariation between X and Y? (Do X and Y consistently vary
together?)
. Have you controlled for all confounding variables (Z)?
– Is a third variable (Z) influencing both X and Y?
– Example: More police → less crime? But maybe wealthier areas
have both more police and less crime = confounder

Covariation
● Variables change together
● Necessary for causality but does not imply it
● Different from reverse causality: Reverse means Y → X
● Different from confounding: Confounder (Z) causes both X and Y

Confounding Variable Example:


● X = Rally attendance, Y = Political knowledge
● Z = Education (affects both X and Y)

Problems Measuring Concepts


● Conceptual Clarity: Is the concept clearly defined? E.g., “income” could
mean job income or parental wealth
● Reliability: Produces same result consistently
● Measurement Bias: Systematic error (e.g., always under-reporting
income)
○ Biased but reliable > inconsistent
● Validity:
○ Face Validity: Seems correct on the surface
○ Content Validity: Includes all necessary parts, excludes irrelevant —

most important type


○ Construct Validity: Matches theoretical expectations (e.g., jumping

backwards isn’t an exercise measure)

Variable Types
● Categorical (Nominal): Named groups with no order (e.g., state)
● Ordinal: Ordered, but intervals not meaningful (e.g., agree-disagree)
● Continuous: Infinite values on a numeric scale (e.g., age, GDP)

Statistical Tools
Rank Statistics
● Median, Quartiles, IQR (Q3 − Q1)
● Used when data is skewed or has outliers
Central Limit Theorem (CLT)
● Sampling distribution of the mean becomes normal (bell-shaped) with
large samples
● Justifies statistical inference even if population is skewed
Statistical Inference
● Making claims about a population from a sample
● Accepts uncertainty — “best guess” from evidence

Bivariate Tests
IV Type DV Type Test Type
Categorical Categorical Chi-Square / Tabular
Continuous Categorical Logit / Probit
Categorical Continuous T-Test / Difference of
Means
Continuous Continuous Regression /
Correlation

Regression & Multicollinearity


What is Regression?
● Statistical method for estimating relationships
● OLS = Ordinary Least Squares
● Visualized as a line minimizing prediction error
Key Terms:
● Independent Variable (IV) = Predictor
● Dependent Variable (DV) = Outcome
● Intercept (α) = Value of Y when X = 0
● Coefficient (β) = Effect of one unit increase in X on Y
● P-Value: Probability result is due to chance (significant if < 0.05)
● Slope = Coefficient → rise/run of the line
Dummy Variable
● Encodes binary info (e.g., male = 0, female = 1)
● Allows categorical data in regression
Multicollinearity
● Occurs in multiple regression (not bivariate)
● Two IVs are highly correlated → hard to separate effects
● Use VIF (Variance Inflation Factor):
○ VIF > 10 = multicollinearity problem

Example: Dem = 0.2 + 0.24 * GDP - 0.32 * War


● Intercept = baseline value when predictors = 0
● GDP coefficient = positive relationship with democracy
● War coefficient = negative relationship
● Interpret signs, sizes, and p-values

You might also like