Skip to content

Commit

Permalink
fix(quantify_multi_test): 修正检验统计量的输出格式 (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
Snoopy1866 authored Nov 14, 2024
1 parent 669f53e commit 8464b5d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/quantify/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ OUTDATA = T1(KEEP = SEQ ITEM VALUE)
>
> - <sup>2</sup> 检验统计量输出格式的默认值为 _w.d_,其中:
>
> - _w_ = $\max(\lceil\log_{10}\left|s\right|\rceil, 7)$, $s$ 表示检验统计量的值
> - _w_ = $\max(\lceil\log_{10}\left|s\right|\rceil, 1) + 6$, $s$ 表示检验统计量的值
> - _d_ = 4
>
> - <sup>3</sup> 假设检验 P 值输出格式的默认值为 `qtmt_pvalue.``qtmt_pvalue.` 由以下 PROC FORMAT 过程定义:
Expand Down
6 changes: 3 additions & 3 deletions gbk/quantify_multi_test.sas
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ Version Date: 2024-01-05 0.1
run;
proc sql noprint;
%if %superq(ts_format) = #AUTO %then %do;
select max(ceil(log10(abs(Z_WIL))) + 6, 7) into : ts_fmt_width from tmp_qmt_wcxtest; /*计算输出格式的宽度*/
select max(ceil(log10(abs(Z_WIL))), 1) + 6 into : ts_fmt_width from tmp_qmt_wcxtest; /*计算输出格式的宽度*/
%let ts_format = &ts_fmt_width..4;
%end;
insert into tmp_qmt_outdata
Expand Down Expand Up @@ -276,7 +276,7 @@ Version Date: 2024-01-05 0.1
%put NOTE: 方差不齐,使用 Satterthwaite t 检验!;
proc sql noprint;
%if %superq(ts_format) = #AUTO %then %do;
select max(ceil(log10(abs(tValue))) + 6, 7) into : ts_fmt_width from tmp_qmt_ttests where Variances = "不等于"; /*计算输出格式的宽度*/
select max(ceil(log10(abs(tValue))), 1) + 6 into : ts_fmt_width from tmp_qmt_ttests where Variances = "不等于"; /*计算输出格式的宽度*/
%let ts_format = &ts_fmt_width..4;
%end;
insert into tmp_qmt_outdata
Expand All @@ -291,7 +291,7 @@ Version Date: 2024-01-05 0.1
%else %do;
proc sql noprint;
%if %superq(ts_format) = #AUTO %then %do;
select max(ceil(log10(abs(tValue))) + 6, 7) into : ts_fmt_width from tmp_qmt_ttests where Variances = "等于"; /*计算输出格式的宽度*/
select max(ceil(log10(abs(tValue))), 1) + 6 into : ts_fmt_width from tmp_qmt_ttests where Variances = "等于"; /*计算输出格式的宽度*/
%let ts_format = &ts_fmt_width..4;
%end;
insert into tmp_qmt_outdata
Expand Down
6 changes: 3 additions & 3 deletions utf8/quantify_multi_test.sas
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ Version Date: 2024-01-05 0.1
run;
proc sql noprint;
%if %superq(ts_format) = #AUTO %then %do;
select max(ceil(log10(abs(Z_WIL))) + 6, 7) into : ts_fmt_width from tmp_qmt_wcxtest; /*计算输出格式的宽度*/
select max(ceil(log10(abs(Z_WIL))), 1) + 6 into : ts_fmt_width from tmp_qmt_wcxtest; /*计算输出格式的宽度*/
%let ts_format = &ts_fmt_width..4;
%end;
insert into tmp_qmt_outdata
Expand Down Expand Up @@ -276,7 +276,7 @@ Version Date: 2024-01-05 0.1
%put NOTE: 方差不齐,使用 Satterthwaite t 检验!;
proc sql noprint;
%if %superq(ts_format) = #AUTO %then %do;
select max(ceil(log10(abs(tValue))) + 6, 7) into : ts_fmt_width from tmp_qmt_ttests where Variances = "不等于"; /*计算输出格式的宽度*/
select max(ceil(log10(abs(tValue))), 1) + 6 into : ts_fmt_width from tmp_qmt_ttests where Variances = "不等于"; /*计算输出格式的宽度*/
%let ts_format = &ts_fmt_width..4;
%end;
insert into tmp_qmt_outdata
Expand All @@ -291,7 +291,7 @@ Version Date: 2024-01-05 0.1
%else %do;
proc sql noprint;
%if %superq(ts_format) = #AUTO %then %do;
select max(ceil(log10(abs(tValue))) + 6, 7) into : ts_fmt_width from tmp_qmt_ttests where Variances = "等于"; /*计算输出格式的宽度*/
select max(ceil(log10(abs(tValue))), 1) + 6 into : ts_fmt_width from tmp_qmt_ttests where Variances = "等于"; /*计算输出格式的宽度*/
%let ts_format = &ts_fmt_width..4;
%end;
insert into tmp_qmt_outdata
Expand Down

0 comments on commit 8464b5d

Please sign in to comment.