View source: R/Run_Regression.R
Run_Regression | R Documentation |
This function conducts a regression analysis and provides the results in a pdf file. It can also perform predictions on a new csv data file and provide the results in a csv file.
Run_Regression(mydata, myformula, prediction_data = 0, resizepaper = 1)
mydata |
csv data file |
myformula |
formula for the lm() model |
prediction_data |
csv data file with the same set of variable names as those in the mydata data set; intended for prediction. The da The default value set at 0 tells the function that no prediction data set has been provided by the user. |
resizepaper |
How much larger should the pdf paper size be to fit everything? |
## Not run:
# This is the sample code to be copied and used in a new R Script:
library(listentodata)
clear_console()
mydata = load_csv_data()
head(mydata) #shows top rows in the Console
str(mydata) #shows structure of the data
myformula = "Sales ~ ."
resizepaper = 1
Run_Regression(mydata, myformula, resizepaper)
# If you have data for prediction:
prediction_data = load_csv_data()
Run_Regression(mydata, myformula, prediction_data, resizepaper)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.