Skip to main content

I am an undergrad student and I'm super new to R! I have a data set that I have split into a training and test set. I obtained a multiple regression model from my training set, and now I want to use it to predict my test data. My dependent variable is Plant Species Richness (PSR), and my original data set had 4 independent variables (Area, AdjacentWetlands, Roads, and Forest) but my model is only using Area and Forest: LM<-lm(PSR~Area+Forest, data=Wetlands)LM<-lm(PSR~Area+Forest, data=Wetlands). How do I use this model to predict PSR in my test set? And then how do I assess whether it is a good prediction or not? Thank you!!

I am an undergrad student and I'm super new to R! I have a data set that I have split into a training and test set. I obtained a multiple regression model from my training set, and now I want to use it to predict my test data. My dependent variable is Plant Species Richness (PSR), and my original data set had 4 independent variables (Area, AdjacentWetlands, Roads, and Forest) but my model is only using Area and Forest: LM<-lm(PSR~Area+Forest, data=Wetlands). How do I use this model to predict PSR in my test set? And then how do I assess whether it is a good prediction or not? Thank you!!

I am an undergrad student and I'm super new to R! I have a data set that I have split into a training and test set. I obtained a multiple regression model from my training set, and now I want to use it to predict my test data. My dependent variable is Plant Species Richness (PSR), and my original data set had 4 independent variables (Area, AdjacentWetlands, Roads, and Forest) but my model is only using Area and Forest: LM<-lm(PSR~Area+Forest, data=Wetlands). How do I use this model to predict PSR in my test set? And then how do I assess whether it is a good prediction or not?

Source Link
Hilmac
  • 31
  • 1
  • 1
  • 2

Using multiple regression model from training set to predict test data in R

I am an undergrad student and I'm super new to R! I have a data set that I have split into a training and test set. I obtained a multiple regression model from my training set, and now I want to use it to predict my test data. My dependent variable is Plant Species Richness (PSR), and my original data set had 4 independent variables (Area, AdjacentWetlands, Roads, and Forest) but my model is only using Area and Forest: LM<-lm(PSR~Area+Forest, data=Wetlands). How do I use this model to predict PSR in my test set? And then how do I assess whether it is a good prediction or not? Thank you!!