Publications by Ching-Fang Wu
W4 homework 4
#Nested designs An experiment on a cognitive task was conducted. The design involved 4 classes nested within two methods of instruction. Thirty-two subjects were randomly assigned to one of the eight conditions. The score was the number of correct responses on the post-treatment test. Source: Kirk, R. (1982). Experimental Designs: Procedures for ...
535 sym R (2083 sym/19 pcs) 1 img
W4 homework 3
#Analysis of variance #Problem Description At the end of six weeks of therapy, the changes of the absolute theta power of electroencephalogram (EEG) of 19 depressed patients in nine selected channels of the patients’ brain were recorded. 1 pacman::p_load(car, tidyverse, lme4, GGally) 2 input data dta <- read.table("C:/Users/Ching-Fang Wu/Doc...
1317 sym R (13625 sym/48 pcs) 3 img
W5 in-class exercise 1-1
1 install packages pacman::p_load(mlmRev, tidyverse, lme4) 2 data from mlmRev package #從"mlmRev"這個package中取得Hsb82這個資料集 data(Hsb82, "mlmRev") ## Warning in data(Hsb82, "mlmRev"): data set 'mlmRev' not found 3 show structure of data str(Hsb82) ## 'data.frame': 7185 obs. of 8 variables: ## $ school : Ord.factor w/ 160 ...
957 sym R (4959 sym/38 pcs) 4 img
W5 in-class exercise 1-2
1 pacman::p_load(mlmRev, tidyverse, lme4) #pacman::p_load()同時取代install.packages()及library(),功能與p_load()一樣 2 data from mlmRev package data(Hsb82) #Loads specified data sets 3 first 6 lines head(Hsb82) ## school minrty sx ses mAch meanses sector cses ## 1 1224 No Female -1.528 5.876 -0.434383 Pub...
2042 sym R (5433 sym/25 pcs) 3 img
Week6 In-class exercises 1
1 Data information The data consist of weight gains of 68 Asian children in a British community. Measurements of weight were recorded for children on up to five occasions visiting a clinic. The ages at which the measurements were taken are roughly to target examination dates of 6 weeks, then 8, 12, 27 months. pacman::p_load(tidyverse, afex, segme...
1082 sym R (9577 sym/31 pcs) 4 img
W7 In-class exercises 2
The arrhythmogenic dose of epinephrine (ADE) is determined by infusing epinephrine into an animal until arrhythmia criterion is reached. The arrhythmia criterion was the occurrence of four intermittent or continuous premature ventricular contractions. Once the criterion has been reached, the infusion required to produce it is recorded. The ADE is...
958 sym R (8589 sym/27 pcs) 2 img
Week8 In-class exercises 2
1 Introduction Silvapulle (1981) reported a study on the relation between psychiatric diagnosis and the score on a 12-item General Health Questionnaire (GHQ) for 120 patients admitted to a hospital. Download the ghq.rda data file to your “data” folder and load it to your R session with the command #> load(“data/ghq.rda”) Column 1: Gender ...
1414 sym R (4788 sym/32 pcs) 4 img
Week7 In-class exercises 3
In the Netherlands, residents in the rural area of Vlagtwedde in the north-east and residents in the urban, industrial area of Vlaardingen in the south-west, were recruited to participate in a study on chronic obstructive lung diseases. The participants, initially aged 15-44, were surveyed approximately every 3 years for up to 21 years. At each s...
2059 sym R (37747 sym/203 pcs) 4 img
Week8 Homework1
Reproduce the results of analysis reported in Chapter 11 of Behavioral data analysis with R (Cheng & Sheu, 2015) with this R script and the married dataset. 1 Data Management #讀資料 dta <- read.table("C:/Users/Ching-Fang Wu/Documents/data/married.txt", header = T) #程式報表11.1 head(dta) #顯示前六筆,看資料結構 ## 教�...
1842 sym R (32891 sym/94 pcs) 5 img
W1 in-class exercise 3
In-class exercises 3: There are two regression lines (ligh blue and dark blue) on the figure of the language and math example. One of them is based on aggregates while the other, on individual scores. Indicate which is which? Which has a steeper slope? 1 Introduction Ecological correlations are based on rates or averages. They tend to overstate ...
1047 sym R (1245 sym/8 pcs) 1 img