Publications by Ching-Fang Wu

W2 in-class exercise 5

14.07.2021

Problem statement Draw a scatter plot of the variable normexam against the variable standLRT from the data set Exam{mlmRev}. Superimpose on it another scatter plot using the means of the same two variables by school. You can start by editing this rmarkdown template in RStudio before submitting the output to moodle. Data management In this sectio...

1100 sym R (1325 sym/12 pcs) 1 img

W2 in-class exercise 6

14.07.2021

Problem statement Edit this rmarkdown template in RStudio to reproduce the following histogram for correlation coefficients between written and course variables by school from the data set Gcsemv{mlmRev}. The two vertical lines indicate averaged correlations over schools and correlation computed over individuals ignoring school label. Which is wh...

518 sym R (1151 sym/14 pcs) 1 img

W2 Homework 1

15.07.2021

Problem statement Draw a scatter plot of the variables written and course scores from the data set Gcsemv{mlmRev} and superimpose another scatter plot on it using mean written and mean course scores by school as in the language and math example. You can start by editing in RStudio either the gcsemv rmarkdown or the exam rmarkdown file. Data mana...

1148 sym R (881 sym/10 pcs) 1 img 1 tbl

W2 Homework 4

15.07.2021

1 Problem statement For the IQ and language example, plot 131 school-level regression lines of language score against verbal IQ (similar to the figure on the page). Compute the mean and standard deviation of the intercept and slope estimates. What is the correlation coefficient between the two parameter estimates? 2 Introduction The data set is ...

1043 sym R (2275 sym/10 pcs) 2 img 1 tbl

W2 Homework 3

16.07.2021

Problem statement Reproduce the plot on the NLSY 86 example by completing the R script using the data file in wide format. Introduction The data are drawn from the National Longitudinal Survey of Youth (NLSY). The sample observations are from the 1986, 1988, 1990, and 1992 assessment periods. Children were selected to be in kindergarten, first, ...

1310 sym R (4832 sym/8 pcs) 2 img 1 tbl

W3 in-class exercise 1

22.07.2021

1 Problem statement Complete the regression analysis of the blood pressure data from the Framingham Heart Study in the R script . In there a gender difference in regression slopes? 2 Data management # file location fL<-"https://math.montana.edu/shancock/data/Framingham.txt" # dta <- read.table(fL, header=T) # inspect data structure str(dta) #...

282 sym R (2033 sym/19 pcs) 2 img 4 tbl

dataM L9 inclass exercise

07.12.2021

Q1 Explain what does this statement do: lapply(lapply(search(), ls), length) search() #是查詢目前所有被載入的套件列表 ## [1] ".GlobalEnv" "package:stats" "package:graphics" ## [4] "package:grDevices" "package:utils" "package:datasets" ## [7] "package:methods" "Autoloads" "package:base" #lapply(X, FUN, ....

2355 sym R (20941 sym/97 pcs)

dataM L8 exercises

05.12.2021

Q1 The distribution of personal disposable income in Taiwan in 2015 has a story to tell. Revise the following plot to enhance that message. # tools library(tidyverse) ## -- Attaching packages --------------------------------------- tidyverse 1.3.1 -- ## v ggplot2 3.3.5 v purrr 0.3.4 ## v tibble 3.1.2 v dplyr 1.0.7 ## v tidyr 1....

1582 sym R (59691 sym/169 pcs) 33 img 1 tbl

dataM L7 inclass exercise

23.11.2021

Q1 Find out what each code chunk (indicated by ‘##’) in the R scriptdoes and provide comments ## #先畫框 plot(women, type='n') #type='n'是指不畫點或線 #再畫第一列資料點 points(women[1,]) #上兩式合起來可以這樣表達 plot(women[1,], type='p') #type='p'畫點 # 使用 lattice lattice::xyplot(weight ~ height, ...

2792 sym R (9479 sym/62 pcs) 23 img 1 tbl

dataM L6 in-class exercise 1-3

21.11.2021

Q1 The R script illustrates how to implement ‘small multiples’ in base graphics given the 4 different diets of the ChickWeight{datasets} example. Adapt the script to produce a plot of 5 panels in which each panel shows a histogram of IQ for each of 5 classes with over 30 pupils in the nlschools{MASS} dataset. ChickWeight{datasets} example #i...

1104 sym R (16014 sym/56 pcs) 24 img