Adding dependent variable to test data set

datamodeling

#1

i have performed a logistic regression to a data set . Now i wanted to add a dependent variable to a new data set by using my model . how to do this ?


#3

If the dependent variable is not present, you can use predict function in R .
Below is the example how you can do it.
ex: predict(model_name, new_dataset_name)


#4

i have predicted for the test set . now i want to use the same model for another dataset which don not have dependent variable . so now i have to add dependent variable to the new data set


#5

You should use a search engine and search for ‘how to add a variable to a dataframe in r’ OR ‘how to add a variable to a dataframe in python’ . With some effort, you will find the answer.