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...
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...
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,...
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...
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...
Hello, below is the STATA question i am having trouble with. I understand you dont have...
Hello, below is the STATA question i am having trouble with. I understand you dont have the dataset, however, is there any help you may please provide? Maybe the commands in STATA needed for this problem? Thank you. Please download the hprice dataset (housing prices) and answer the following questions: 1. Run a regression where your x variable is age and your y variable is price. a) What is the null hypothesis? Alternate hypothesis? b) Do you expect the coefficient...
MBA 5008 Quantitative Analysis The question presented to me which I dont fully understand and requesting...
MBA 5008 Quantitative Analysis The question presented to me which I dont fully understand and requesting assitance in answering. When developing a simple regression model one utilizes a method to predict a linear relationship between a dependent variable and an independent variable. However, there may be more than one independent variable that affect the dependent variable. In this case we utilize the multiple regression method. 1. Describe the objective in using simple and or multiple regression models. 2. What does...
I am reading in a CSV file (using R). When I first check if there are...
I am reading in a CSV file (using R). When I first check if there are any NA's there are none. I then clean my data and convert my Income variable from num to factor by using this code to discretize income by equal-width bins: min_income <- min(bd$income) max_income <- max(bd$income) bins = 3 width=(max_income - min_income)/bins; bd$income = cut(bd$income, breaks=seq(min_income, max_income, width)) When I complete cleaning/updating my data and check again for NA's I receive one. It is specific...
PLEASE NOTE I DO NOT UNDERSTAND THE SOLUTION GIVEN FROM THE BOOK SO CAN YOU DO...
PLEASE NOTE I DO NOT UNDERSTAND THE SOLUTION GIVEN FROM THE BOOK SO CAN YOU DO IT PLEASE A panel of 300 persons chosen for jury duty includes 30 under 25 years of age. Since the jury of 12 persons chosen from this panel to judge a drug violation does not include anyone under 25 years of age, the youthful defendant’s attorney complains that this jury is not really representative. Indeed she argues, if the selection were random, the probability...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT