The textbook’s chapter on linear models (“Line Up, Please”) introduces linear predictive modeling using the workhorse tool known as multiple regression. The term “multiple regression” has an odd history, dating back to an early scientific observation of a phenomenon called “regression to the mean.” These days, multiple regression is just an interesting name for using a simple linear modeling technique to measuring the connection between one or more predictor variables and an outcome variable In this exercise, we are going to use an open data set to explore antelope population.

Learning Goals for this activity:

A. Develop skills for manipulating and transforming data that contains missing values.
B. Understand the application of multiple linear regression to simple situations of predicting one numeric variable from one or more other numeric variables.
C. Practice plotting skills.
D. Build debugging skills.
E. Increase familiarity with bringing external data sets into R.
F. Increase familiarity with sources of advice and ideas on R source code.

LS0tCnRpdGxlOiAiSG9tZXdvcmsgODogTGluZWFyIFJlZ3Jlc3Npb24iCmF1dGhvcjogCi0gQXV0aG9yMQpkYXRlOiAiYHIgU3lzLnRpbWUoKWAiCm91dHB1dDogaHRtbF9ub3RlYm9vawotLS0KCmBgYHtyIHNldHVwLCBpbmNsdWRlPUZBTFNFfQojIEluc3RhbGwgcGFja2FnZXMgaWYgbmVjZXNzYXJ5CgpgYGAKClRoZSB0ZXh0Ym9va+KAmXMgY2hhcHRlciBvbiBsaW5lYXIgbW9kZWxzICjigJxMaW5lIFVwLCBQbGVhc2XigJ0pIGludHJvZHVjZXMgbGluZWFyIHByZWRpY3RpdmUgbW9kZWxpbmcgdXNpbmcgdGhlIHdvcmtob3JzZSB0b29sIGtub3duIGFzIG11bHRpcGxlIHJlZ3Jlc3Npb24uIFRoZSB0ZXJtIOKAnG11bHRpcGxlIHJlZ3Jlc3Npb27igJ0gaGFzIGFuIG9kZCBoaXN0b3J5LCBkYXRpbmcgYmFjayB0byBhbiBlYXJseSBzY2llbnRpZmljIG9ic2VydmF0aW9uIG9mIGEgcGhlbm9tZW5vbiBjYWxsZWQg4oCccmVncmVzc2lvbiB0byB0aGUgbWVhbi7igJ0gVGhlc2UgZGF5cywgbXVsdGlwbGUgcmVncmVzc2lvbiBpcyBqdXN0IGFuIGludGVyZXN0aW5nIG5hbWUgZm9yI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