#question 3library(faraway)help(seatpos)Frwrd1 = lm(hipcenter~1, data = seatpos)indep.vars <- ~Age + Weight + Ht + Legadd1(Frwrd1, indep.vars, test = "F")Frwrd1 = update(Frwrd1, .~. + Ht)add1(Frwrd1, indep.vars, test = "F")Bkwrd1 = lm(hipcenter ~ Age + Weight + Ht + Leg, data = seatpos)drop1(Bkwrd1, test="F")Bkwrd1 = update(Bkwrd1, .~. - Weight)drop1(Bkwrd1, test="F")Bkwrd1 = update(Bkwrd1, .~. - Age)drop1(Bkwrd1, test="F")Bkwrd1 = update(Bkwrd1, .~. - Leg)drop1(Bkwrd1, test="F")library(leaps)x = model.matrix(hipcenter~Age+Weight+Ht+Leg-1, data = seatpos)y = seatpos$hipcenterbestmods = leaps(x,y,nbest=1)bestmodsCpplot(bestmods)colnames(x)[c(1,3,4)]