Question

How do I code backward/forward selection in R with BIC as the criteria? Note: This is...

How do I code backward/forward selection in R with BIC as the criteria?

Note: This is for multiple linear regression in which I am using this for variable selection.

Please include any packages neccesary.

Homework Answers

Answer #1

You need to install SignifReg package first. Then, use the SignifReg function.

This is the description of the function:
Provide a significant variable selection procedure with different directions (forward, backward, stepwise) based on diverse criteria (Mallows’ Cp, AIC, BIC, adjusted r-square, p-value). The algorithm selects a final model with only significant variables based on a correction choice of False Discovery Rate, Bonferroni, or no correction.

You can google "SignifReg in R" for further details about the syntax and usage of the function.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
2.) In this problem, we will perform multiple regression on the Boston housing data. The data...
2.) In this problem, we will perform multiple regression on the Boston housing data. The data contains 506 records with 14 variables. The variable medv is the response variable. Solve the following problems in R and print out the commands and outputs : To assess the data use library(MASS) data(Boston) (a) First perform a multiple regression with all the variables, what can you say about the significance of the variables based on only the p-values. Next use the ”step” function...
Does anybody have a code example of a "local linear regression model from scratch" in R?...
Does anybody have a code example of a "local linear regression model from scratch" in R? (ie, not using packages)? I can't find any clues anywhere on this. Thank you in advance!
Java -How do I check if a number is valid without looping or any iterative processes?...
Java -How do I check if a number is valid without looping or any iterative processes? So I have a program that prompts the user to enter a number 1-5. (can include 1 and 5). It is to keep prompting the user until they enter a valid number. It's easy to do this with a while loop but for this assignment we are not supposed to use any type of loops or iterative processes. I am not good at recursion...
2. Consider the data set has four variables which are Y, X1, X2 and X3. Construct...
2. Consider the data set has four variables which are Y, X1, X2 and X3. Construct a multiple regression model using Y as response variable and other X variables as explanatory variables. (a) Write mathematics formulas (including the assumptions) and give R commands to obtain linear regression models for Y Xi, i =1, 2 and 3. (b) Write several lines of R commands to obtain correlations between Xi and Xj , i 6= j and i, j = 1, 2,...
using r (include all code and packages used) Generate 25 variables, each of which consists of...
using r (include all code and packages used) Generate 25 variables, each of which consists of 25 random samples from a standard normal. Store these variables in a data frame – call it df.train – and randomly select one variable to be the response – rename it y. (The end result should be a data frame with 25 observations on 25 variables but with no relationships between any of the variables.) Repeat step (a) to create a test set called...
HI HOW DO I USE THE RANDOM FUNCTION IN MY CODE TO GET RANDOM NUMBERS OF...
HI HOW DO I USE THE RANDOM FUNCTION IN MY CODE TO GET RANDOM NUMBERS OF DRAWING RANGING FROM 3-6. i am a little confuse because inuse random function for heighet and size and it worked but i get just one output instead of 4 or 3 or 5 depending on the time i run the code sinces its random.
Hello, I am trying to do an assignment that requires writing an MSP432 code to add...
Hello, I am trying to do an assignment that requires writing an MSP432 code to add two 64 bit numbers together and store the result in memory location 0x2000_0000. The problem is that the it is a 32 bit register. I don't know how to add to a load 64 bit numbers. The question is below but please feel free to use your own examples, I will understand better. Thank you very much. Write a small MSP432 code segment that...
Consider this scenario: I am the owner of a burger store. I want to expand my...
Consider this scenario: I am the owner of a burger store. I want to expand my business. I want to recruit a waiter and an assistant manager. I am selecting my employees based on P-J fit (Person-Job fit) and P-O fit (Person-Organization fit). My question is: How do I do the selection effectiveness evaluation? Which methods to use? Please provide justifications for your answer. Note: If you are not sure how to fulfill the requirements needed, please do not attempt...
How do I make this code not include negative numbers in the total or average if...
How do I make this code not include negative numbers in the total or average if they are entered? (C++) For example, if you enter 4, 2, and -2, the average should not factor in the -2 and would be equal to 3. I want the code to factor in positive numbers only. ----- #include using namespace std; int main() {    int x, total = 0, count = 0;       cout << "Type in first value ";   ...
I'm using Rstudio and i am not very familiar using it. I am not sure how...
I'm using Rstudio and i am not very familiar using it. I am not sure how i am suppose to code this to place it in the chunk to get results. Let's think of calendar year 2016 as a sample of all the days in olywthr. First create a dataframe, cal2016, containing only days in 2016 from the larger dataframe olywthr (I have supplied the R code to do this in the following chunk). Run str() and summary() on the...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT