Publications by Yunting Chiu
US Socioeconomic Factors of COVID-19
Install Packages Install the required libraries library(broom) # convert analysis objects from R into tidy tibbles library(tidyverse) # tidy data library(psych) # EDA library(countrycode) # get the continents library(lubridate) # adjust the date variable library(usmap) # find out the US states library(readxl) # read MS excel file library(corrplo...
7188 sym R (40343 sym/123 pcs) 5 img
Data Visualization
Questions 1. Load msleep data frame into R. library(ggplot2) suppressMessages(library(dplyr)) library(lattice) data("msleep") head(msleep) 2. How many mammals are in the msleep data frame? How many variables? Use two R functions to get this information. # 83 mammals in the data frame, 11 variables. total_mammals <- matrix(msleep, nrow = 1, ncol...
2534 sym R (2961 sym/23 pcs) 10 img
Lists and Iteration
Instructions Clone this homework repo to your homework directory as a new repo. Rename the starter file under the analysis directory as hw_01_yourname.Rmd and use it for your solutions. Modify the “author” field in the YAML header. Stage and Commit R Markdown and HTML files (no PDF files). Push both .Rmd and HTML files to GitHub. Make su...
8238 sym R (11694 sym/107 pcs) 3 img
Food Safety in Africa
1 - Team Members Yunting Chiu: tidy data, statistical analysis, project management, data mapping, data visualization. Kingsley Ofoegbu: data analysis, data-driven hypotheses, data visualization, report writing, tidy data, regression. Shan Lin: report writing, literature review, data evaluation. Doudou Shi: report writing, data visualization, dat...
7025 sym R (1775 sym/4 pcs) 12 img
dplyr
Exercise 1: Pygmalion Data library(Sleuth3) library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ── ## ✓ ggplot2 3.3.3 ✓ purrr 0.3.4 ## ✓ tibble 3.1.2 ✓ dplyr 1.0.6 ## ✓ tidyr 1.1.3 ✓ ...
3152 sym R (4635 sym/52 pcs) 6 img
t-test
Review of Estimation and Hypothesis Testing (handouts, your old notes, …) When \(\alpha\) is not given, use the p-value approach to make your conclusions. When it’s difficult to conclude, use \(\alpha\) = 0.05. For two-sample problems, use the F-test to decide which t-test to use. The manufacturer of a certain brand of household light bulbs ...
8402 sym R (6297 sym/26 pcs) 6 img
intercept and slope
(1.2) The members of a health spa pay annual membership dues of \(\$300\) plus a charge of \(\$2\) for each visit to the spa. Let Y denote the dollar cost for the year for a member and X the number of visits by the member during the year. Express the relation between X and Y mathematically. Is it a functional relation or a statistical relation (t...
5525 sym R (2113 sym/24 pcs) 6 img
Linear Regression Assumptions
(3.12) A student does not understand why the sum of squares SSPE is called a pure error sum of squares “since the formula looks like the one for an ordinary sum of squares”. Explain. SSE = lack of fit error(SSLF) + pure error(SSPE) One possibility is pure error is relatively large and the linear model appears to be adequate. That is, a major...
5710 sym R (1874 sym/23 pcs) 7 img
Fitting Regression Models
(7.1) State the number of degrees of freedom that are associated with each of the following extra sums of squares: SSReg(X1 | X2), SSReg(X2 | X1, X3), SSReg(X1, X2 | X3, X4), SSReg(X1, X2, X3 | X4, X5). A note about the notation. SSReg(A | B) is the extra sum of squares that appeared as aresult of including variables A into the regression model ...
7978 sym R (4129 sym/26 pcs) 5 img
F-statistic
(2.17) An analyst fitted normal error regression model and conducted an F test of H0 : \(\beta1\) = 0 versus H1 : \(\beta1\) = 0. The P-value of the test was 0.033, and the analyst concluded that \(\beta1\) = 0. Was the \(\alpha\) level used by the analyst greater than or smaller than 0.033? If the \(\alpha\) level had been 0.01, what would have ...
4853 sym R (1497 sym/8 pcs) 6 img 1 tbl