Editing Statistics and Statistical Programming (Winter 2017)/Problem Set: Week 3
From CommunityData
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 11: | Line 11: | ||
:'''PC4.''' Get to know your data! Do whatever is necessary to summarize the new dataset. Now many columns and rows are there? What are the appropriate summary statistics to report for each variable? What are the ranges, minimums, maximums, means, medians, standard deviations of the variables of variables? Draw histograms for all of the variables to get a sense of what it looks like. Save code to do all of these things. | :'''PC4.''' Get to know your data! Do whatever is necessary to summarize the new dataset. Now many columns and rows are there? What are the appropriate summary statistics to report for each variable? What are the ranges, minimums, maximums, means, medians, standard deviations of the variables of variables? Draw histograms for all of the variables to get a sense of what it looks like. Save code to do all of these things. | ||
:'''PC5.''' Compare the <code>week2.dataset</code> vector with the first column (<code>x</code>) of the data frame. I mentioned in the video lecture that they are similar? Do you agree? How similar? Write R code to demonstrate or support this answer convincingly. | :'''PC5.''' Compare the <code>week2.dataset</code> vector with the first column (<code>x</code>) of the data frame. I mentioned in the video lecture that they are similar? Do you agree? How similar? Write R code to demonstrate or support this answer convincingly. | ||
:'''PC6.''' Visualize the data using <code>ggplot2</code> | :'''PC6.''' Visualize the data using <code>ggplot2</code>. Graphing the <code>x</code> on the x-axis and <code>y</code> on the y-axis seem pretty reasonable! If only it were always so easy! Graph i, j, and k on other dimensions (e.g., color, shape, and size seems reasonable). Did you run into any trouble? How would you work around this? | ||
:'''PC7.''' A very common step when you import and prepare for data analysis is going to be cleaning and coding data. Some of that is needed here. As is very common, <code>i</code>, <code>j</code> are really dichotomous | :'''PC7.''' A very common step when you import and prepare for data analysis is going to be cleaning and coding data. Some of that is needed here. As is very common, <code>i</code>, <code>j</code> are really dichotomous variables but they are coded as 0 and 1 in this dataset. Recode these columns as <code>logical</code> (i.e., true false) in the dataset. The variable <code>k</code> is really a categorical variable. Can you recode this as a factor and change the numbers into textual "meaning" to make it easier. Here's the mapping: 0=none, 1=some, 2=lots, 3=all. The goals is to end up with a factor where those text strings are the levels of the factor. I haven't shown you how to do exactly this but you can solve this with things I ''have'' shown you. Or you can try to find a recipe online. | ||
:'''PC8.''' | :'''PC8.''' Once you have recoded your data, generate new summary statistics or information. Also, go back and regenerate the visualizations. How have these changed? How are these different from the summary detail you presented above? | ||
:'''PC9.''' As always, save your work as an R script. Commit that R script to your homework git repository and sync/push it to GitHub. Verify that it is online on the GitHub website at the URL linked to from the [[Statistics and Statistical Programming (Winter 2017)/List of student git repositories]] page. | |||
:''' | |||
== Statistical Questions == | == Statistical Questions == |