Using Fitted Line in the Scatter plot in StataĪs, the prediction is given about the negative relationship between mileage and prices. From the image below, it is clear that there exists negative relationship between mileage and price, thus price decreases when mileage increases and vice versa. The price and mpg will be chosen in the respective dependent and independent variable list as shown below.Ĭlicking on the submit button generates the following scatter plot in the Stata. Simply, we want to study how mileage (mpg) would affect the price of the cars. In the twoway graphs, as shown in above image, the scatter plot in Stata can be created by clicking on the create option, where scatter option is chosen.Īs scatter plot is the relationship between two variables, one dependent and one independent, so our dependent or y variable here is Price and independent variable or x variable is the Mpg. However, our aim is to create scatter plot here, so we will choose the first option of Twoway graphs. Looking at the drop-down list in graphics, it is visible that all kinds of graphs can be created, including pie charts and bar graphs. To create scatterplot for the data we used, click on Graphics in the menu bar. Scatter Plot in Stata Related Book: A Visual Guide to Stata Graphics by Michael N. The data we choose has different variables including price of the cars, their mileage, manufacturing country etc. We will continue with the auto data given on the first row to create scatter plots in the Stata. By clicking on the last option, a list of files or data sets is appeared, by which you can use a given data set to practice on Stata.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |