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), "",

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 290 views

## 1 answer to this question.

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() ()
• 2,960 points

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

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

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

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

## 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

## Big Data transformations with R

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

## Finding frequency of observations in R

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

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