As an exercise on multiple regression, we will analyse the FEV dataset.

1 The FEV dataset

The FEV, which is an acronym for forced expiratory volume, is a measure of how much air a person can exhale (in liters) during a forced breath. In this dataset, the FEV of 606 children, between the ages of 6 and 17, were measured. The dataset also provides additional information on these children: their age, their height, their gender and, most importantly, whether the child is a smoker or a non-smoker.

2 Goal

The goal of this experiment was to find out if smoking has an effect on the FEV of children, accounting for potential confounders.

3 Load libraries and import the data

4 Data tidying

5 Data exploration

Visualize the effect of smoking on the FEV. In addition, assess all potential confounders.

6 Data analysis

7 Conclusion

LS0tCnRpdGxlOiAiVHV0b3JpYWwgOC4yOiBNdWx0aXBsZSByZWdyZXNzaW9uIG9uIHRoZSBGRVYgZGF0YXNldCIgICAKb3V0cHV0OgogICAgaHRtbF9kb2N1bWVudDoKICAgICAgY29kZV9kb3dubG9hZDogdHJ1ZSAgICAKICAgICAgdGhlbWU6IGNvc21vCiAgICAgIHRvYzogdHJ1ZQogICAgICB0b2NfZmxvYXQ6IHRydWUKICAgICAgaGlnaGxpZ2h0OiB0YW5nbwogICAgICBudW1iZXJfc2VjdGlvbnM6IHRydWUKLS0tCgpBcyBhbiBleGVyY2lzZSBvbiBtdWx0aXBsZSByZWdyZXNzaW9uLCB3ZSB3aWxsIGFuYWx5c2UKdGhlIEZFViBkYXRhc2V0LgoKIyBUaGUgRkVWIGRhdGFzZXQKClRoZSBGRVYsIHdoaWNoIGlzIGFuIGFjcm9ueW0gZm9yIGZvcmNlZCBleHBpcmF0b3J5IHZvbHVtZSwKaXMgYSBtZWFzdXJlIG9mIGhvdyBtdWNoIGFpciBhIHBlcnNvbiBjYW4gZXhoYWxlIChpbiBsaXRlcnMpIApkdXJpbmcgIGEgZm9yY2VkIGJyZWF0aC4gSW4gdGhpcyBkYXRhc2V0LCB0aGUgRkVWIG9mIDYwNiBjaGlsZHJlbiwKYmV0d2VlbiB0aGUgYWdlcyBvZiA2IGFuZCAxNywgd2VyZSBtZWFzdXJlZC4gVGhlIGRhdGFzZXQKYWx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