4. [6pt] Use the fat data in Question 1, and consider the same response variable. Suppose researchers are interested in
Posted: Mon Nov 15, 2021 10:07 am
# the fat data in Question 1 is as below.
[R code]
library(faraway)
data('fat', package='faraway')
fat_origin <- fat
fat <- fat_origin[, -c(1,3)] # col1: brozek, col3:
density
too difficult.. plz...!
4. [6pt] Use the fat data in Question 1, and consider the same response variable. Suppose researchers are interested in whether neck, chest, hip, thigh predictors are jointly significant after adjusting weight, height, age. Carry out the following test and calculate a p-value. You should implement LRT and score test using statistical software (i.e. R/Python). You should not use any built-in function for LRT and score tests (but you can use tje lm function) (Note: you should submit the code] (a) Calculate p-value of using likelihood ratio test. (b) Calculate p-value of using Score test.
[R code]
library(faraway)
data('fat', package='faraway')
fat_origin <- fat
fat <- fat_origin[, -c(1,3)] # col1: brozek, col3:
density
too difficult.. plz...!
4. [6pt] Use the fat data in Question 1, and consider the same response variable. Suppose researchers are interested in whether neck, chest, hip, thigh predictors are jointly significant after adjusting weight, height, age. Carry out the following test and calculate a p-value. You should implement LRT and score test using statistical software (i.e. R/Python). You should not use any built-in function for LRT and score tests (but you can use tje lm function) (Note: you should submit the code] (a) Calculate p-value of using likelihood ratio test. (b) Calculate p-value of using Score test.