If you know that you have autocorrelation within variables (i.e. Independence of observations (aka no autocorrelation)īecause we only have one independent variable and one dependent variable, we don’t need to test for any hidden relationships among variables.We can use R to check that our data meet the four main assumptions for linear regression. Step 2: Make sure your data meet the assumptions This tells us the minimum, median, mean, and maximum values of the independent variable (income) and dependent variable (happiness):Īgain, because the variables are quantitative, running the code produces a numeric summary of the data for the independent variables (smoking and biking) and the dependent variable (heart disease): Simple regression summary(income.data)īecause both our variables are quantitative, when we run this function we see a table in our console with a numeric summary of the data. Click on the Import button and the file should appear in your Environment tab on the upper right side of the RStudio screen.Īfter you’ve loaded the data, check that it has been read in correctly using summary().
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |