![]() It is important to look at whether these points are closely packed together or spread apart. Another component of this plot to look at is the variance of the points. ![]() Based on our plot we can see that as speed increases, the distance to stop also increases, so we have a positive association between the two variables. First of all, there appears to be a clear relationship between the speed of the car and the distance it takes for that car to stop. Main = "Stopping Distance of Cars Based on Speed")įrom this plot we can notice several different things about our data. plot(speed,dist, ylab = "Stopping Distance (Feet)", In this case our two variables are speed and distance, and for this model we will use speed as the explanatory variable while distance will be the response. ![]() This graph will allow us to see the relationship between two quantitative variables. The simplest and most efficient way to do this is through a scatterplot. data(cars)īefore jumping right into linear regression, it is important to look at the data and see if there is a potential linear relationship. ![]() Since this is a built-in data set, it is extremely easy to access and download, and we will attach it right away to make any future commands easier. In this R Guide I will be using the built-in cars data set which contains data about the speed of cars in miles per hour and the corresponding distance that it takes for that car to stop in feet. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |