Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How do i change the R code, so i can perform Logistic regression and QDA (seperate) X = names(mtcars[,-1]) X [1] cyl disp hp drat
How do i change the R code, so i can perform Logistic regression and QDA (seperate)
X = names(mtcars[,-1]) X [1] "cyl" "disp" "hp" "drat" "wt" "qsec" "vs" "am" "gear" "carb" out <- unlist(lapply(1:length(X), function(n) combn(X, n, FUN=function(row) paste0("mpg ~ ", paste0(row, collapse = "+"))))) mods = lapply(out, function(frml) lm(frml, data=mtcars)) # i guess i have to change frml and lm, but i do not know to what. Please provide an solution for logistic regression or QDA or both.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started