Publications by jenny hsu

1026hw1

01.11.2020

1 input data # dta <- read.table("married.txt", h=T) #顯示前六筆,看資料結構 head(dta) ## 教育 性別 婚姻 年齡 ## 1 國小以下 女 未婚 32.5 ## 2 專科 男 有偶 57.5 ## 3 國中 男 有偶 42.5 ## 4 國小以下 男 有偶 42.5 ## 5 高中 女 喪偶 62.5 ## 6 高中 女 有偶 ...

173 sym R (32193 sym/84 pcs) 5 img

1102hw1

08.11.2020

1 input data data(addiction, package = "catdata") dta<-addiction head(dta) ## ill gender age university ## 1 1 1 61 0 ## 2 0 1 43 0 ## 3 2 0 44 0 ## 4 0 1 21 1 ## 5 0 0 33 0 ## 6 1 0 83 0 str(dta) ## 'data.frame': 712 obs. of 4 vari...

854 sym R (3375 sym/20 pcs) 3 img

1102hw1

08.11.2020

input data data(addiction, package = "catdata") dta<-addiction head(dta) str(dta) dta$gender <- factor(dta$gender, 0:1, labels = c("M", "F")) dta$ill <- factor(dta$ill, 0:2, labels = c("weak-willed","disease","both")) dta$university <- factor(dta$university, 0:1, labels = c("No","Yes")) str(dta) with(dta, table(ill, gender)) with(dta, tabl...

71 sym R (1857 sym/6 pcs)

1102hw2

08.11.2020

dta2 <- read.table("physical_activity.txt", h=T) head(dta2) ## bmi count ## 1 22 0 ## 2 31 0 ## 3 29 0 ## 4 33 0 ## 5 18 0 ## 6 25 0 str(dta2) ## 'data.frame': 357 obs. of 2 variables: ## $ bmi : int 22 31 29 33 18 25 28 30 29 16 ... ## $ count: int 0 0 0 0 0 0 0 0 0 0 ... 1 numerical summaries ...

879 sym R (3549 sym/17 pcs) 1 img

1109hw2

23.11.2020

1 data input dta2 <- read.table("cantabrian.txt", h=T) names(dta2) <- c("ID","Health","Gender","Type") head(dta2) ## ID Health Gender Type ## 1 1 0 M GP ## 2 1 0 M GHQ ## 3 2 0 M GP ## 4 2 0 M GHQ ## 5 3 0 M GP ## 6 3 0 M GHQ 2 data management library(dplyr) ## ...

438 sym R (3065 sym/17 pcs)

1109inclass2

23.11.2020

1 data input dta <- read.table("insomnia.txt", h=T) head(dta) ## case treat occasion resp ## 1 1 1 0 1 ## 2 1 1 1 1 ## 3 2 1 0 1 ## 4 2 1 1 1 ## 5 3 1 0 1 ## 6 3 1 1 1 2 repolr function: GEE model fitted in ordinal data library(repolr)...

877 sym R (2567 sym/10 pcs) 1 img

1123hw3

30.11.2020

1 data input dta <- read.table("geometryAL.txt", h=T) head(dta) ## score board gender age mgcse itype iid ## 1 8 3 1 1 0.856 7 1001 ## 2 8 3 1 -6 0.856 7 1001 ## 3 8 3 1 5 0.856 7 1001 ## 4 10 3 1 -1 0.856 7 1001 ## 5 8 3 1 -5 0.856 7 1001 ## 6 ...

68 sym R (4019 sym/14 pcs) 4 img

1130inclass1

06.12.2020

1 setting # set options options(digits = 4, show.signif.stars = FALSE) # load packages for later use pacman::p_load(bdots, tidyverse, nlme) 2 input data # load data data(ci) # read data head(ci) ## protocol Subject Time Fixations LookType ## 1 NH 36 0 0 Cohort ## 2 NH 36 4 0 Cohort ## ...

684 sym R (10834 sym/33 pcs) 11 img

1130inclass1

06.12.2020

1 setting # set digit and stars options options(digits = 4, show.signif.stars = FALSE) 2 data input # regular contrast polarity (i.e., black on white) dta <- read.table("C:/Users/user/Desktop/multilevel/1130/mnread0.txt", header = T) # load packages for later use pacman::p_load(tidyverse, nlme) # set plot theme to black-n-white ot <- the...

643 sym R (7898 sym/24 pcs) 7 img

1130hw2

06.12.2020

1 input data dta2 <- read.table("fox_geese.txt", h=T) dta2$ID <- as.factor(dta2$ID) str(dta2) ## 'data.frame': 445 obs. of 4 variables: ## $ ID : Factor w/ 17 levels "S101","S102",..: 1 1 1 1 1 1 1 1 1 1 ... ## $ Game : int 1 2 3 4 5 6 7 8 9 10 ... ## $ Moves: int 4 7 8 3 3 3 7 6 3 7 ... ## $ Read : num 1.4 1.4 1.4 1.4 1.4 1....

412 sym R (8692 sym/34 pcs) 5 img