This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full 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 – Preregulation/Postregulation – 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: q1variables 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.944e02 2.708e02 2.934 2....
View
Full Document
 Spring '08
 KENDALL,BERKLEY
 Environmental Science, Regression Analysis, Residual standard error, freedom Multiple Rsquared

Click to edit the document details