Publications by Ching-Fang Wu
in class exercise 7
In-Class exercise7: Reproduce the results of the loudness example by completing the R markdown file 1 Introduction Ten subjects were played tones at each of 5 loudnesses, in random order. Subjects were asked to draw a line on paper whose length matched the loudness of the tone. Each subject repeated each loudness 3 times, for a total of 30 tri...
1096 sym R (2242 sym/15 pcs) 5 img
in class exercise 6
In-class exercise 6: 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 ...
721 sym R (1536 sym/15 pcs) 2 img
in class exercise 5
Data management In this section, we load the exam scores data set, activate the help page for it, and examine the first 6 lines of the data frame object. # install a contributed package #install.packages("mlmRev") # load the package to working directory library(mlmRev) # load the data from the package data(Exam, package="mlmRev") # invoke help...
769 sym R (1325 sym/12 pcs) 1 img
WEEK3 in-class exercise 4:Box Office
#input data dta<-read.table("C:/Users/Ching-Fang Wu/Documents/data/boxoffice.txt",h=T) #exam structure str(dta) ## 'data.frame': 32 obs. of 2 variables: ## $ GrossBoxOffice: num 95.3 86.4 119.4 124.4 154.2 ... ## $ year : int 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 ... 總計有32年的歷年票房數據,起始年�...
400 sym R (1253 sym/14 pcs) 1 img
WEEK3 in-class exercise 2
regression with clusters options(digits=5, show.signif.stars=FALSE) load the packages #install.packages("pacman") pacman::p_load(alr4, tidyverse, magrittr) make sure data set is active data(Stevens, package="alr4") str(Stevens) ## 'data.frame': 50 obs. of 5 variables: ## $ subject : Factor w/ 10 levels "A","B","C","D",..: 1 1 1 1 1 2 2...
1032 sym R (8568 sym/24 pcs) 3 img
WEEK 3 homework 1
example of regression with sampling weights set some options options(digits=3, show.signif.stars=FALSE) 設定環境 packagage management #install.packages("pacman") load packages pacman::p_load(alr4, tidyverse) load data data(UN11, package="alr4") seed the random number generator to get the same sample set.seed(6102) 隨機取樣 pick 81 ...
785 sym R (2700 sym/19 pcs) 1 img
WEEK3 homework 3
regression with correlations over time and in clusters set significant decimal points don’t print silly stars options(digits=4, show.signif.stars=FALSE) handle package loading automatically #install.package(pacman) load packages pacman::p_load(tidyverse, nlme, broom, magrittr, MuMIn) load data set #data(Oxboys, package="nlme") girl_hight<...
782 sym R (5595 sym/30 pcs) 6 img
WEEK 4 in-class exercise 1
#Random effects example # pacman::p_load(tidyverse, lme4) 1 dta <- read.table("C:/Users/Ching-Fang Wu/Documents/data/family.txt", header = T) 2 data structure str(dta) ## 'data.frame': 12 obs. of 2 variables: ## $ family : int 1 1 1 2 2 2 2 3 3 4 ... ## $ liberalism: int 25 29 34 18 21 21 26 31 35 30 ... 3 first 6 lines head(dta)...
398 sym R (4589 sym/23 pcs)
W4 homework 1
#install.packages #install.packages("PairedData") #library library(PairedData) ## Loading required package: MASS ## Loading required package: gld ## Loading required package: mvtnorm ## Loading required package: lattice ## Loading required package: ggplot2 ## ## Attaching package: 'PairedData' ## The following object is masked from 'package:bas...
484 sym R (2946 sym/32 pcs) 2 img
WEEK 4 in-class exercise 2
#Nested Designs - Chicano #input data dta <- read.csv('C:/Users/Ching-Fang Wu/Documents/data/Chicano.csv', stringsAsFactors = TRUE) #exam structure str(dta) ## 'data.frame': 24 obs. of 4 variables: ## $ Pupil: Factor w/ 24 levels "P01","P02","P03",..: 1 2 3 4 5 6 7 8 9 10 ... ## $ Class: Factor w/ 6 levels "C1","C2","C3",..: 1 1 1 1 2 2 2...
290 sym R (1894 sym/13 pcs) 1 img