Non-continuous variables 08B

# Non-continuous variables 08B - 1 Regression with...

This preview shows pages 1–8. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Regression with categorical independent variables ESM 206B 15 Jan. 2008 2 Types of variables Numeric • Continuous – Observations can take on, in principle, any real number – Infinite # of possible values between 1 and 10 • Discrete – Observations can take on, in principle, any integer – 10 possible values between 1 and 10 Categorical • Dichotomous: – Male/Female – Pre-regulation/Post-regulation – Island/Mainland • Nominal (“nom” = “named”) – Continent – Political party – Soil type • Ordinal (“ord” = “ordered”) – Survey response: strongly disagree, disagree, neutral, agree, strongly agree – Size classifications: small, medium, large – Income ranges 3 Dummy variables • How can we handle “categorical” explanatory (independent) variables in a regression? • Answer: make a dummy! • Dichotomous: zero or one • Categorical with q categories: q-1variables each scored zero or one (examples to follow) 4 Alien Species • Exotic species cause economic and ecological damage • Not all countries equally invaded • Want to understand characteristics of country that make it more likely to be “invaded”. • We’ll measure “invasiveness” as fraction of species that are Alien • Two hypotheses 1. Human population density plays a role in a country’s invasiveness. 2. Island nations are more invaded than mainland nations. 5 200 400 600 800 1000 1200 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Pop_dens Prop_exotic Mainland Island 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Island Prop_exotic 6 A Simple Model • ISL is a Dummy variable , coded 0 if mainland, 1 if island • Dummy changes intercept (explain). i i i i P ISL A ε α α α + + + = 3 2 1 7 Call: lm(formula = Prop_exotic ~ Pop_dens + Island, data = ExoticSpecies) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.944e-02 2.708e-02 2.934 2....
View Full Document

{[ snackBarMessage ]}

### Page1 / 24

Non-continuous variables 08B - 1 Regression with...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online