| ... | ... | @@ -43,6 +43,7 @@ The raw data consist of: |
|
|
|
- Code of Census Blok
|
|
|
|
- Raw Data Y in numeric type
|
|
|
|
- Code of Area
|
|
|
|
|
|
|
|
2. Change the name of column into:
|
|
|
|
- Code of Census Blok become “bs_o”
|
|
|
|
- Raw Data Y become “pop”
|
| ... | ... | @@ -52,6 +53,7 @@ The raw data consist of: |
|
|
|
colnames(data_1) <- c("bs_o","pop","kab")
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
3. Run the function of complex survey by input:
|
|
|
|
- Data
|
|
|
|
- Sampling fraction (in decimal)
|
| ... | ... | @@ -59,10 +61,17 @@ The raw data consist of: |
|
|
|
|
|
|
|
```
|
|
|
|
res_1_srs_0.8 <- resampling_srs(data = data_1, prop = 0.8, iterasi = 100)
|
|
|
|
res_1_1sc_0.8 <- resampling_1sc(data = data_1, prop = 0.8, iterasi = 100)
|
|
|
|
res_1_2sc_srs_0.85 <- resampling_2sc_srs(data = data_1, f1 = 0.85, f2 = 0.85, iterasi = 20)
|
|
|
|
res_1_2sc_pps_0.85 <- resampling_2sc_pps(data = data_1, f1 = 0.85, f2 = 0.85, iterasi = 20)
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
4. View the result of complex survey estimation
|
|
|
|
|
|
|
|
```
|
|
|
|
View(res_1_srs_0.8)
|
|
|
|
View(res_1_1sc_0.8)
|
|
|
|
View(res_1_2sc_srs_0.85)
|
|
|
|
View(res_1_2sc_pps_0.85)
|
|
|
|
``` |