library(PRcalc)data(jp_upper_2019)# Jefferson vs alpha = 10list(prcalc(jp_upper_2019, m =50, method ="dt"),prcalc(jp_upper_2019, m =50, method ="ad", extra =10)) |>compare() |>print(use_gt =TRUE)
Party
Model1
Model2
自民
18
18
公明
7
7
立憲
8
8
維新
5
5
共産
5
5
国民
3
3
れいわ
2
2
社民
1
1
N国
1
1
安楽死
0
0
幸福
0
0
オリーブ
0
0
労働者
0
0
# Dean vs alpha = -4list(prcalc(jp_upper_2019, m =50, method ="dean"),prcalc(jp_upper_2019, m =50, method ="ad", extra =-4)) |>compare() |>print(use_gt =TRUE)
Party
Model1
Model2
自民
17
17
公明
6
6
立憲
7
7
維新
5
5
共産
4
4
国民
3
3
れいわ
2
2
社民
1
1
N国
1
1
安楽死
1
1
幸福
1
1
オリーブ
1
1
労働者
1
1
Note 2: About "custom divisor" ("cd") method
Please note that extra parameter (extra) is required. extra must be length of maximum value of m or longer.
list(prcalc(jp_upper_2019, m =50, method ="msl"),prcalc(jp_upper_2019, m =50, method ="cd", extra =c(1.4, seq(3, 100, by =2)))) |>compare() |>print(use_gt =TRUE)
Please note that extra parameter (extra) is required. extra must be length of maximum value of m or longer. For detail, see “Customized allocation methods” section in calculation tutorial.