Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Algebra And Trigonometry (Subscription)

Authors: Michael Sullivan, Michael Sullivan III

11th Edition

0135227712, 9780135227718

More Books

Students also viewed these Mathematics questions

Question

d. Full Stop

Answered: 1 week ago