What s the difference between and in lm in R

0 votes
I should note at the outset of this piece that I have very little experience with R and only a very fundamental understanding of statistics. If I use the wrong terminology, I wish to apologise (and that I most definitely need to do more reading).

One of the 17 variables in the dataset I'm now looking at is the dependent variable, and the other 16 are independent variables. I have to decide which linear model between these variables is "better."

So, this is what I have to work with:

MA1 - lm(step

the formula as.formula(paste(colnames(NLCD)[1], "",

Collapse = "*" and paste (colnames(NLCD)[c(2:17)]

Data = NLCD (),

))

So, NLCD is the name of the dataset, while MA1 is a model. I'm confused as to whether use "*" or "+" for the stepwise regression. RStudio freezes when I run the model with the "*"
Jun 22, 2022 in Data Science by avinash
• 1,840 points
948 views

1 answer to this question.

0 votes

Lm is a fitting method for linear models.

The following syntax is used by this function:

formula, data, and lm

where:

formula: The linear model's formula (for instance, y = x1 + x2)

information: The title of the data frame containing the information

2. GLM - Generalized linear models are fitted using this.

The following syntax is used by this function:

the formula glm(formula, family=gaussian, data,...)

where:

formula: The linear model's formula (for instance, y = x1 + x2)

the statistical family to be applied while fitting the model. Gaussian is the default, although there are also alternatives for binomial, poisson, and Gamma distributions.

information: The title of the data frame containing the information

Keep in mind that the family argument used by the glm() method is the only distinction between these two functions.

If you employ glm or lm() ()

Unleash the power of data with our comprehensive Data Science Training.

answered Jun 24, 2022 by Sohail
• 3,040 points

Related Questions In Data Science

0 votes
1 answer

The difference between Map() and map () from Purrr package in R

The tilde just indicates to the map ...READ MORE

answered Jun 14, 2022 in Data Science by Sohail
• 3,040 points
488 views
0 votes
0 answers

The difference of na.rm and na.omit in R

I've just started with R and I've ...READ MORE

Jul 22, 2022 in Data Science by avinash
• 1,840 points
739 views
0 votes
0 answers

What is the difference between rm() and rm(list=ls())?

The majority of items I've read. They ...READ MORE

Jul 5, 2022 in Data Science by avinash
• 1,840 points
434 views
0 votes
1 answer

Why is it not advisable to use attach() in R, and what should I use instead?

There is one more option that applies ...READ MORE

answered Jun 24, 2022 in Data Science by Sohail
• 3,040 points
466 views
0 votes
1 answer

Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE

answered Dec 18, 2017 in Data Analytics by Sudhir
• 1,570 points
1,030 views
0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
1,178 views
0 votes
1 answer

Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
5,890 views
0 votes
1 answer

Left Join and Right Join using "dplyr"

The below is the code to perform ...READ MORE

answered Mar 27, 2018 in Data Analytics by Bharani
• 4,660 points
1,112 views
0 votes
1 answer

Difference between the == and %in% operators in R

percent in percent "returns a vector of ...READ MORE

answered Jun 20, 2022 in Data Science by Sohail
• 3,040 points
724 views
0 votes
1 answer

Difference between the == and %in% operators in R

According to help('percent in percent'), percent in ...READ MORE

answered Jun 23, 2022 in Data Science by Sohail
• 3,040 points
497 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP