Publications by Li-Hsin Chien

迴規模型 ch2

17.09.2023

Text book: Linear Models with R, 2nd, Julian J. Faraway 1. Least Square Estimation data(gala, package="faraway") ? gala ## 在指定的程式套件和圖書館裡沒有與 'gala' 有關的說明書: ## 您可以用用 '??gala' 資料gala: Description: There are 30 Galapagos islands (加拉巴哥群島) and 7 variables in the dataset. The rela...

1897 sym

迴歸模型 ch1

17.09.2023

Text book: Linear Models with R, 2nd, Julian J. Faraway 1.2 Initional Data Analysis Package faraway 裡面收集了這本書用到的資料。 #install.packages("faraway") library(faraway) ## Warning: 套件 'faraway' 是用 R 版本 4.3.1 來建造的 data(pima) ? pima ## 開啟 httpd 求助伺服器… 好了 資料 pima: Description: The Nati...

920 sym R (4680 sym/28 pcs) 7 img

迴歸模型 0918

17.09.2023

Text book: Linear Models with R, 2nd, Julian J. Faraway 1.2 Initional Data Analysis Package faraway 裡面收集了這本書用到的資料。 #install.packages("faraway") library(faraway) ## Warning: 套件 'faraway' 是用 R 版本 4.3.1 來建造的 data(pima) ? pima ## 開啟 httpd 求助伺服器… 好了 資料 pima: Description: The Nati...

918 sym R (4119 sym/26 pcs) 7 img

Survey Sampling-Chapter 3.4-Sep, 2022

28.09.2022

1. Read data from .csv setwd("D:\\course\\111-1\\Survey Sampling\\Rnote\\Rpub") # 設定路徑 getwd() #取得目前路徑 ## [1] "D:/course/111-1/Survey Sampling/Rnote/Rpub" data <- read.csv("mammals.csv") head(data) # print the first 8 rows ## species brain_wt ## 1 African Elephant 5712.0 ## 2 African giant p...

833 sym 9 img

Survey Sampling-Chapter 3.3-Sep, 2022

29.09.2022

1. Basic calculations 1+2 + 2*3 - 2^2 + exp(2)/2 ## [1] 8.694528 2*pi ## [1] 6.283185 2. Create scalor, vector, and matrix \[ a=3, b=(1,2,3,4),c=(4,5,6,7), d = {\begin{pmatrix} 1 & 4\\ 2 & 5\\ 3 & 6\\ 4 & 7\\ \end{pmatrix}}, e= \begin{pmatrix} 1 & 2 & 3 & 4\\ 4 & 5 & 6 & 7\\ \end{pmatrix} \] a <- 3 print(a) ## [1] 3 b <- c(1,2,3,4...

971 sym

Survey Sampling-Chapter 4.3-Oct, 2022

06.10.2022

Figure 4.1 Load the brain weight data data <- read.csv("D:\\course\\111-1\\Survey Sampling\\Rnote\\Rpub\\mammals.csv") dim(data) ## [1] 68 2 head(data) ## species brain_wt ## 1 African Elephant 5712.0 ## 2 African giant pouched rat 6.6 ## 3 Arctic Fox 44.5 ## 4 Arctic ground squirrel...

1025 sym 2 img

Survey sampling, Section 4.3

13.10.2022

Simple random sampling by using R package \(survey\) \(survey\) is a well-known R package for survey sampling. Install the \(survey\) package, and then load the package in R. #install.packages("survey") # after running this commend, you will have "survey" installed in your R library(survey) # load the package Example (excercise 4.40 in the ...

1980 sym R (1591 sym/18 pcs)

Survey sampling, Section 4.6

16.10.2022

Compare between two independent simple random samples Use the data described in Example 4.10. setwd("D:\\cycu\\111-1\\sampling\\R note\\ch4") data.raw<-read.csv("Maine mercury data.csv") head(data.raw) ## NAME HG.PPM N ELV SA Z LT ST DA RF FR DAM ## 1 ALLEN.P 1.080 3 425 83 27 3 1 2 0.60 2.8 1 ## 2 ...

1681 sym R (4012 sym/16 pcs) 1 img 2 tbl

Survey sampling, Section 5.3

30.10.2022

Stratified Random Sampling Use the data described in Example 5.10. 5.10. A forester wants to estimate the total number of farm acres planted with trees for a state. Because the number of acres of trees varies considerably with the size of the farm, he decides to stratify on farm sizes. The 240 farms in the state are placed in one of four cate...

1191 sym R (3325 sym/14 pcs) 1 img