Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_logisticregression.wasp
Title produced by softwareBias-Reduced Logistic Regression
Date of computationWed, 04 Sep 2013 11:53:19 -0400
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2013/Sep/04/t137831004138265of1h4vh6il.htm/, Retrieved Sat, 04 May 2024 04:05:43 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=211391, Retrieved Sat, 04 May 2024 04:05:43 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact190
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Bias-Reduced Logistic Regression] [] [2013-09-04 15:53:19] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
1	92.23	18.71	5.68	10.61	4.35
0	4.60	1.41	8.66	2.83	3.54
1	18.48	24.96	6.45	11.09	4.79
0	51.66	9.82	2.83	4.20	0.73
1	16.58	36.97	7.07	4.79	0.00
1	43.78	24.28	6.45	0.00	2.50
0	35.04	13.95	2.31	3.62	2.16
1	29.26	8.54	2.50	4.08	4.79
0	15.07	12.11	2.44	2.15	1.18
1	33.01	4.79	6.29	2.50	2.50
1	40.90	14.36	2.50	14.72	2.50
0	9.01	4.05	1.94	0.91	1.53
1	10.81	4.19	1.91	5.96	1.50
1	14.95	5.18	2.01	6.47	0.68




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 5 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=211391&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]5 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=211391&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=211391&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net







Coefficients of Bias-Reduced Logistic Regression
VariableParameterS.E.t-stat2-sided p-value
(Intercept)-1.499005736369211.69057120221338-0.8866859523021780.401116584504778
X1-0.004690144477129330.034903025358382-0.1343764452786320.896424077621957
X20.04416225441499590.0767933651401090.5750790362477550.58104682537275
X30.03524309992563330.2988178183104030.1179417617226020.909021298675439
X40.183009580179080.2013389720551360.9089625238027130.389931667941952
X50.1989494706198220.5092777390710.3906502392638170.70625265117172

\begin{tabular}{lllllllll}
\hline
Coefficients of Bias-Reduced Logistic Regression \tabularnewline
Variable & Parameter & S.E. & t-stat & 2-sided p-value \tabularnewline
(Intercept) & -1.49900573636921 & 1.69057120221338 & -0.886685952302178 & 0.401116584504778 \tabularnewline
X1 & -0.00469014447712933 & 0.034903025358382 & -0.134376445278632 & 0.896424077621957 \tabularnewline
X2 & 0.0441622544149959 & 0.076793365140109 & 0.575079036247755 & 0.58104682537275 \tabularnewline
X3 & 0.0352430999256333 & 0.298817818310403 & 0.117941761722602 & 0.909021298675439 \tabularnewline
X4 & 0.18300958017908 & 0.201338972055136 & 0.908962523802713 & 0.389931667941952 \tabularnewline
X5 & 0.198949470619822 & 0.509277739071 & 0.390650239263817 & 0.70625265117172 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=211391&T=1

[TABLE]
[ROW][C]Coefficients of Bias-Reduced Logistic Regression[/C][/ROW]
[ROW][C]Variable[/C][C]Parameter[/C][C]S.E.[/C][C]t-stat[/C][C]2-sided p-value[/C][/ROW]
[ROW][C](Intercept)[/C][C]-1.49900573636921[/C][C]1.69057120221338[/C][C]-0.886685952302178[/C][C]0.401116584504778[/C][/ROW]
[ROW][C]X1[/C][C]-0.00469014447712933[/C][C]0.034903025358382[/C][C]-0.134376445278632[/C][C]0.896424077621957[/C][/ROW]
[ROW][C]X2[/C][C]0.0441622544149959[/C][C]0.076793365140109[/C][C]0.575079036247755[/C][C]0.58104682537275[/C][/ROW]
[ROW][C]X3[/C][C]0.0352430999256333[/C][C]0.298817818310403[/C][C]0.117941761722602[/C][C]0.909021298675439[/C][/ROW]
[ROW][C]X4[/C][C]0.18300958017908[/C][C]0.201338972055136[/C][C]0.908962523802713[/C][C]0.389931667941952[/C][/ROW]
[ROW][C]X5[/C][C]0.198949470619822[/C][C]0.509277739071[/C][C]0.390650239263817[/C][C]0.70625265117172[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=211391&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=211391&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Coefficients of Bias-Reduced Logistic Regression
VariableParameterS.E.t-stat2-sided p-value
(Intercept)-1.499005736369211.69057120221338-0.8866859523021780.401116584504778
X1-0.004690144477129330.034903025358382-0.1343764452786320.896424077621957
X20.04416225441499590.0767933651401090.5750790362477550.58104682537275
X30.03524309992563330.2988178183104030.1179417617226020.909021298675439
X40.183009580179080.2013389720551360.9089625238027130.389931667941952
X50.1989494706198220.5092777390710.3906502392638170.70625265117172







Summary of Bias-Reduced Logistic Regression
Deviance13.5778799144098
Penalized deviance-7.12414482103309
Residual Degrees of Freedom8
ROC Area0.866666666666667
Hosmer–Lemeshow test
Chi-square5.69597643499026
Degrees of Freedom8
P(>Chi)0.681244073408682

\begin{tabular}{lllllllll}
\hline
Summary of Bias-Reduced Logistic Regression \tabularnewline
Deviance & 13.5778799144098 \tabularnewline
Penalized deviance & -7.12414482103309 \tabularnewline
Residual Degrees of Freedom & 8 \tabularnewline
ROC Area & 0.866666666666667 \tabularnewline
Hosmer–Lemeshow test \tabularnewline
Chi-square & 5.69597643499026 \tabularnewline
Degrees of Freedom & 8 \tabularnewline
P(>Chi) & 0.681244073408682 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=211391&T=2

[TABLE]
[ROW][C]Summary of Bias-Reduced Logistic Regression[/C][/ROW]
[ROW][C]Deviance[/C][C]13.5778799144098[/C][/ROW]
[ROW][C]Penalized deviance[/C][C]-7.12414482103309[/C][/ROW]
[ROW][C]Residual Degrees of Freedom[/C][C]8[/C][/ROW]
[ROW][C]ROC Area[/C][C]0.866666666666667[/C][/ROW]
[ROW][C]Hosmer–Lemeshow test[/C][/ROW]
[ROW][C]Chi-square[/C][C]5.69597643499026[/C][/ROW]
[ROW][C]Degrees of Freedom[/C][C]8[/C][/ROW]
[ROW][C]P(>Chi)[/C][C]0.681244073408682[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=211391&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=211391&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of Bias-Reduced Logistic Regression
Deviance13.5778799144098
Penalized deviance-7.12414482103309
Residual Degrees of Freedom8
ROC Area0.866666666666667
Hosmer–Lemeshow test
Chi-square5.69597643499026
Degrees of Freedom8
P(>Chi)0.681244073408682







Fit of Logistic Regression
IndexActualFittedError
110.8701223148071480.129877685192852
200.517266097224784-0.517266097224784
310.9385707692287550.0614292307712452
400.427021473657983-0.427021473657983
510.7652523999636670.234747600036333
610.5231362028441450.476863797155855
700.531546079051951-0.531546079051951
810.6291707783998380.370829221600162
900.420515597344634-0.420515597344634
1010.4339597302268030.566040269773197
1110.9022712820056750.0977287179943255
1200.305105209789023-0.305105209789023
1310.5229362097184250.477063790281575
1410.5124557564774570.487544243522543

\begin{tabular}{lllllllll}
\hline
Fit of Logistic Regression \tabularnewline
Index & Actual & Fitted & Error \tabularnewline
1 & 1 & 0.870122314807148 & 0.129877685192852 \tabularnewline
2 & 0 & 0.517266097224784 & -0.517266097224784 \tabularnewline
3 & 1 & 0.938570769228755 & 0.0614292307712452 \tabularnewline
4 & 0 & 0.427021473657983 & -0.427021473657983 \tabularnewline
5 & 1 & 0.765252399963667 & 0.234747600036333 \tabularnewline
6 & 1 & 0.523136202844145 & 0.476863797155855 \tabularnewline
7 & 0 & 0.531546079051951 & -0.531546079051951 \tabularnewline
8 & 1 & 0.629170778399838 & 0.370829221600162 \tabularnewline
9 & 0 & 0.420515597344634 & -0.420515597344634 \tabularnewline
10 & 1 & 0.433959730226803 & 0.566040269773197 \tabularnewline
11 & 1 & 0.902271282005675 & 0.0977287179943255 \tabularnewline
12 & 0 & 0.305105209789023 & -0.305105209789023 \tabularnewline
13 & 1 & 0.522936209718425 & 0.477063790281575 \tabularnewline
14 & 1 & 0.512455756477457 & 0.487544243522543 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=211391&T=3

[TABLE]
[ROW][C]Fit of Logistic Regression[/C][/ROW]
[ROW][C]Index[/C][C]Actual[/C][C]Fitted[/C][C]Error[/C][/ROW]
[ROW][C]1[/C][C]1[/C][C]0.870122314807148[/C][C]0.129877685192852[/C][/ROW]
[ROW][C]2[/C][C]0[/C][C]0.517266097224784[/C][C]-0.517266097224784[/C][/ROW]
[ROW][C]3[/C][C]1[/C][C]0.938570769228755[/C][C]0.0614292307712452[/C][/ROW]
[ROW][C]4[/C][C]0[/C][C]0.427021473657983[/C][C]-0.427021473657983[/C][/ROW]
[ROW][C]5[/C][C]1[/C][C]0.765252399963667[/C][C]0.234747600036333[/C][/ROW]
[ROW][C]6[/C][C]1[/C][C]0.523136202844145[/C][C]0.476863797155855[/C][/ROW]
[ROW][C]7[/C][C]0[/C][C]0.531546079051951[/C][C]-0.531546079051951[/C][/ROW]
[ROW][C]8[/C][C]1[/C][C]0.629170778399838[/C][C]0.370829221600162[/C][/ROW]
[ROW][C]9[/C][C]0[/C][C]0.420515597344634[/C][C]-0.420515597344634[/C][/ROW]
[ROW][C]10[/C][C]1[/C][C]0.433959730226803[/C][C]0.566040269773197[/C][/ROW]
[ROW][C]11[/C][C]1[/C][C]0.902271282005675[/C][C]0.0977287179943255[/C][/ROW]
[ROW][C]12[/C][C]0[/C][C]0.305105209789023[/C][C]-0.305105209789023[/C][/ROW]
[ROW][C]13[/C][C]1[/C][C]0.522936209718425[/C][C]0.477063790281575[/C][/ROW]
[ROW][C]14[/C][C]1[/C][C]0.512455756477457[/C][C]0.487544243522543[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=211391&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=211391&T=3

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Fit of Logistic Regression
IndexActualFittedError
110.8701223148071480.129877685192852
200.517266097224784-0.517266097224784
310.9385707692287550.0614292307712452
400.427021473657983-0.427021473657983
510.7652523999636670.234747600036333
610.5231362028441450.476863797155855
700.531546079051951-0.531546079051951
810.6291707783998380.370829221600162
900.420515597344634-0.420515597344634
1010.4339597302268030.566040269773197
1110.9022712820056750.0977287179943255
1200.305105209789023-0.305105209789023
1310.5229362097184250.477063790281575
1410.5124557564774570.487544243522543







Type I & II errors for various threshold values
ThresholdType IType II
0.0101
0.0201
0.0301
0.0401
0.0501
0.0601
0.0701
0.0801
0.0901
0.101
0.1101
0.1201
0.1301
0.1401
0.1501
0.1601
0.1701
0.1801
0.1901
0.201
0.2101
0.2201
0.2301
0.2401
0.2501
0.2601
0.2701
0.2801
0.2901
0.301
0.3100.8
0.3200.8
0.3300.8
0.3400.8
0.3500.8
0.3600.8
0.3700.8
0.3800.8
0.3900.8
0.400.8
0.4100.8
0.4200.8
0.4300.4
0.440.1111111111111110.4
0.450.1111111111111110.4
0.460.1111111111111110.4
0.470.1111111111111110.4
0.480.1111111111111110.4
0.490.1111111111111110.4
0.50.1111111111111110.4
0.510.1111111111111110.4
0.520.2222222222222220.2
0.530.4444444444444440.2
0.540.4444444444444440
0.550.4444444444444440
0.560.4444444444444440
0.570.4444444444444440
0.580.4444444444444440
0.590.4444444444444440
0.60.4444444444444440
0.610.4444444444444440
0.620.4444444444444440
0.630.5555555555555560
0.640.5555555555555560
0.650.5555555555555560
0.660.5555555555555560
0.670.5555555555555560
0.680.5555555555555560
0.690.5555555555555560
0.70.5555555555555560
0.710.5555555555555560
0.720.5555555555555560
0.730.5555555555555560
0.740.5555555555555560
0.750.5555555555555560
0.760.5555555555555560
0.770.6666666666666670
0.780.6666666666666670
0.790.6666666666666670
0.80.6666666666666670
0.810.6666666666666670
0.820.6666666666666670
0.830.6666666666666670
0.840.6666666666666670
0.850.6666666666666670
0.860.6666666666666670
0.870.6666666666666670
0.880.7777777777777780
0.890.7777777777777780
0.90.7777777777777780
0.910.8888888888888890
0.920.8888888888888890
0.930.8888888888888890
0.9410
0.9510
0.9610
0.9710
0.9810
0.9910

\begin{tabular}{lllllllll}
\hline
Type I & II errors for various threshold values \tabularnewline
Threshold & Type I & Type II \tabularnewline
0.01 & 0 & 1 \tabularnewline
0.02 & 0 & 1 \tabularnewline
0.03 & 0 & 1 \tabularnewline
0.04 & 0 & 1 \tabularnewline
0.05 & 0 & 1 \tabularnewline
0.06 & 0 & 1 \tabularnewline
0.07 & 0 & 1 \tabularnewline
0.08 & 0 & 1 \tabularnewline
0.09 & 0 & 1 \tabularnewline
0.1 & 0 & 1 \tabularnewline
0.11 & 0 & 1 \tabularnewline
0.12 & 0 & 1 \tabularnewline
0.13 & 0 & 1 \tabularnewline
0.14 & 0 & 1 \tabularnewline
0.15 & 0 & 1 \tabularnewline
0.16 & 0 & 1 \tabularnewline
0.17 & 0 & 1 \tabularnewline
0.18 & 0 & 1 \tabularnewline
0.19 & 0 & 1 \tabularnewline
0.2 & 0 & 1 \tabularnewline
0.21 & 0 & 1 \tabularnewline
0.22 & 0 & 1 \tabularnewline
0.23 & 0 & 1 \tabularnewline
0.24 & 0 & 1 \tabularnewline
0.25 & 0 & 1 \tabularnewline
0.26 & 0 & 1 \tabularnewline
0.27 & 0 & 1 \tabularnewline
0.28 & 0 & 1 \tabularnewline
0.29 & 0 & 1 \tabularnewline
0.3 & 0 & 1 \tabularnewline
0.31 & 0 & 0.8 \tabularnewline
0.32 & 0 & 0.8 \tabularnewline
0.33 & 0 & 0.8 \tabularnewline
0.34 & 0 & 0.8 \tabularnewline
0.35 & 0 & 0.8 \tabularnewline
0.36 & 0 & 0.8 \tabularnewline
0.37 & 0 & 0.8 \tabularnewline
0.38 & 0 & 0.8 \tabularnewline
0.39 & 0 & 0.8 \tabularnewline
0.4 & 0 & 0.8 \tabularnewline
0.41 & 0 & 0.8 \tabularnewline
0.42 & 0 & 0.8 \tabularnewline
0.43 & 0 & 0.4 \tabularnewline
0.44 & 0.111111111111111 & 0.4 \tabularnewline
0.45 & 0.111111111111111 & 0.4 \tabularnewline
0.46 & 0.111111111111111 & 0.4 \tabularnewline
0.47 & 0.111111111111111 & 0.4 \tabularnewline
0.48 & 0.111111111111111 & 0.4 \tabularnewline
0.49 & 0.111111111111111 & 0.4 \tabularnewline
0.5 & 0.111111111111111 & 0.4 \tabularnewline
0.51 & 0.111111111111111 & 0.4 \tabularnewline
0.52 & 0.222222222222222 & 0.2 \tabularnewline
0.53 & 0.444444444444444 & 0.2 \tabularnewline
0.54 & 0.444444444444444 & 0 \tabularnewline
0.55 & 0.444444444444444 & 0 \tabularnewline
0.56 & 0.444444444444444 & 0 \tabularnewline
0.57 & 0.444444444444444 & 0 \tabularnewline
0.58 & 0.444444444444444 & 0 \tabularnewline
0.59 & 0.444444444444444 & 0 \tabularnewline
0.6 & 0.444444444444444 & 0 \tabularnewline
0.61 & 0.444444444444444 & 0 \tabularnewline
0.62 & 0.444444444444444 & 0 \tabularnewline
0.63 & 0.555555555555556 & 0 \tabularnewline
0.64 & 0.555555555555556 & 0 \tabularnewline
0.65 & 0.555555555555556 & 0 \tabularnewline
0.66 & 0.555555555555556 & 0 \tabularnewline
0.67 & 0.555555555555556 & 0 \tabularnewline
0.68 & 0.555555555555556 & 0 \tabularnewline
0.69 & 0.555555555555556 & 0 \tabularnewline
0.7 & 0.555555555555556 & 0 \tabularnewline
0.71 & 0.555555555555556 & 0 \tabularnewline
0.72 & 0.555555555555556 & 0 \tabularnewline
0.73 & 0.555555555555556 & 0 \tabularnewline
0.74 & 0.555555555555556 & 0 \tabularnewline
0.75 & 0.555555555555556 & 0 \tabularnewline
0.76 & 0.555555555555556 & 0 \tabularnewline
0.77 & 0.666666666666667 & 0 \tabularnewline
0.78 & 0.666666666666667 & 0 \tabularnewline
0.79 & 0.666666666666667 & 0 \tabularnewline
0.8 & 0.666666666666667 & 0 \tabularnewline
0.81 & 0.666666666666667 & 0 \tabularnewline
0.82 & 0.666666666666667 & 0 \tabularnewline
0.83 & 0.666666666666667 & 0 \tabularnewline
0.84 & 0.666666666666667 & 0 \tabularnewline
0.85 & 0.666666666666667 & 0 \tabularnewline
0.86 & 0.666666666666667 & 0 \tabularnewline
0.87 & 0.666666666666667 & 0 \tabularnewline
0.88 & 0.777777777777778 & 0 \tabularnewline
0.89 & 0.777777777777778 & 0 \tabularnewline
0.9 & 0.777777777777778 & 0 \tabularnewline
0.91 & 0.888888888888889 & 0 \tabularnewline
0.92 & 0.888888888888889 & 0 \tabularnewline
0.93 & 0.888888888888889 & 0 \tabularnewline
0.94 & 1 & 0 \tabularnewline
0.95 & 1 & 0 \tabularnewline
0.96 & 1 & 0 \tabularnewline
0.97 & 1 & 0 \tabularnewline
0.98 & 1 & 0 \tabularnewline
0.99 & 1 & 0 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=211391&T=4

[TABLE]
[ROW][C]Type I & II errors for various threshold values[/C][/ROW]
[ROW][C]Threshold[/C][C]Type I[/C][C]Type II[/C][/ROW]
[ROW][C]0.01[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.02[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.03[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.04[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.05[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.06[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.07[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.08[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.09[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.1[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.11[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.12[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.13[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.14[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.15[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.16[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.17[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.18[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.19[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.2[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.21[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.22[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.23[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.24[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.25[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.26[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.27[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.28[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.29[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.3[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]0.31[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.32[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.33[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.34[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.35[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.36[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.37[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.38[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.39[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.4[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.41[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.42[/C][C]0[/C][C]0.8[/C][/ROW]
[ROW][C]0.43[/C][C]0[/C][C]0.4[/C][/ROW]
[ROW][C]0.44[/C][C]0.111111111111111[/C][C]0.4[/C][/ROW]
[ROW][C]0.45[/C][C]0.111111111111111[/C][C]0.4[/C][/ROW]
[ROW][C]0.46[/C][C]0.111111111111111[/C][C]0.4[/C][/ROW]
[ROW][C]0.47[/C][C]0.111111111111111[/C][C]0.4[/C][/ROW]
[ROW][C]0.48[/C][C]0.111111111111111[/C][C]0.4[/C][/ROW]
[ROW][C]0.49[/C][C]0.111111111111111[/C][C]0.4[/C][/ROW]
[ROW][C]0.5[/C][C]0.111111111111111[/C][C]0.4[/C][/ROW]
[ROW][C]0.51[/C][C]0.111111111111111[/C][C]0.4[/C][/ROW]
[ROW][C]0.52[/C][C]0.222222222222222[/C][C]0.2[/C][/ROW]
[ROW][C]0.53[/C][C]0.444444444444444[/C][C]0.2[/C][/ROW]
[ROW][C]0.54[/C][C]0.444444444444444[/C][C]0[/C][/ROW]
[ROW][C]0.55[/C][C]0.444444444444444[/C][C]0[/C][/ROW]
[ROW][C]0.56[/C][C]0.444444444444444[/C][C]0[/C][/ROW]
[ROW][C]0.57[/C][C]0.444444444444444[/C][C]0[/C][/ROW]
[ROW][C]0.58[/C][C]0.444444444444444[/C][C]0[/C][/ROW]
[ROW][C]0.59[/C][C]0.444444444444444[/C][C]0[/C][/ROW]
[ROW][C]0.6[/C][C]0.444444444444444[/C][C]0[/C][/ROW]
[ROW][C]0.61[/C][C]0.444444444444444[/C][C]0[/C][/ROW]
[ROW][C]0.62[/C][C]0.444444444444444[/C][C]0[/C][/ROW]
[ROW][C]0.63[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.64[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.65[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.66[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.67[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.68[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.69[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.7[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.71[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.72[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.73[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.74[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.75[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.76[/C][C]0.555555555555556[/C][C]0[/C][/ROW]
[ROW][C]0.77[/C][C]0.666666666666667[/C][C]0[/C][/ROW]
[ROW][C]0.78[/C][C]0.666666666666667[/C][C]0[/C][/ROW]
[ROW][C]0.79[/C][C]0.666666666666667[/C][C]0[/C][/ROW]
[ROW][C]0.8[/C][C]0.666666666666667[/C][C]0[/C][/ROW]
[ROW][C]0.81[/C][C]0.666666666666667[/C][C]0[/C][/ROW]
[ROW][C]0.82[/C][C]0.666666666666667[/C][C]0[/C][/ROW]
[ROW][C]0.83[/C][C]0.666666666666667[/C][C]0[/C][/ROW]
[ROW][C]0.84[/C][C]0.666666666666667[/C][C]0[/C][/ROW]
[ROW][C]0.85[/C][C]0.666666666666667[/C][C]0[/C][/ROW]
[ROW][C]0.86[/C][C]0.666666666666667[/C][C]0[/C][/ROW]
[ROW][C]0.87[/C][C]0.666666666666667[/C][C]0[/C][/ROW]
[ROW][C]0.88[/C][C]0.777777777777778[/C][C]0[/C][/ROW]
[ROW][C]0.89[/C][C]0.777777777777778[/C][C]0[/C][/ROW]
[ROW][C]0.9[/C][C]0.777777777777778[/C][C]0[/C][/ROW]
[ROW][C]0.91[/C][C]0.888888888888889[/C][C]0[/C][/ROW]
[ROW][C]0.92[/C][C]0.888888888888889[/C][C]0[/C][/ROW]
[ROW][C]0.93[/C][C]0.888888888888889[/C][C]0[/C][/ROW]
[ROW][C]0.94[/C][C]1[/C][C]0[/C][/ROW]
[ROW][C]0.95[/C][C]1[/C][C]0[/C][/ROW]
[ROW][C]0.96[/C][C]1[/C][C]0[/C][/ROW]
[ROW][C]0.97[/C][C]1[/C][C]0[/C][/ROW]
[ROW][C]0.98[/C][C]1[/C][C]0[/C][/ROW]
[ROW][C]0.99[/C][C]1[/C][C]0[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=211391&T=4

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=211391&T=4

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Type I & II errors for various threshold values
ThresholdType IType II
0.0101
0.0201
0.0301
0.0401
0.0501
0.0601
0.0701
0.0801
0.0901
0.101
0.1101
0.1201
0.1301
0.1401
0.1501
0.1601
0.1701
0.1801
0.1901
0.201
0.2101
0.2201
0.2301
0.2401
0.2501
0.2601
0.2701
0.2801
0.2901
0.301
0.3100.8
0.3200.8
0.3300.8
0.3400.8
0.3500.8
0.3600.8
0.3700.8
0.3800.8
0.3900.8
0.400.8
0.4100.8
0.4200.8
0.4300.4
0.440.1111111111111110.4
0.450.1111111111111110.4
0.460.1111111111111110.4
0.470.1111111111111110.4
0.480.1111111111111110.4
0.490.1111111111111110.4
0.50.1111111111111110.4
0.510.1111111111111110.4
0.520.2222222222222220.2
0.530.4444444444444440.2
0.540.4444444444444440
0.550.4444444444444440
0.560.4444444444444440
0.570.4444444444444440
0.580.4444444444444440
0.590.4444444444444440
0.60.4444444444444440
0.610.4444444444444440
0.620.4444444444444440
0.630.5555555555555560
0.640.5555555555555560
0.650.5555555555555560
0.660.5555555555555560
0.670.5555555555555560
0.680.5555555555555560
0.690.5555555555555560
0.70.5555555555555560
0.710.5555555555555560
0.720.5555555555555560
0.730.5555555555555560
0.740.5555555555555560
0.750.5555555555555560
0.760.5555555555555560
0.770.6666666666666670
0.780.6666666666666670
0.790.6666666666666670
0.80.6666666666666670
0.810.6666666666666670
0.820.6666666666666670
0.830.6666666666666670
0.840.6666666666666670
0.850.6666666666666670
0.860.6666666666666670
0.870.6666666666666670
0.880.7777777777777780
0.890.7777777777777780
0.90.7777777777777780
0.910.8888888888888890
0.920.8888888888888890
0.930.8888888888888890
0.9410
0.9510
0.9610
0.9710
0.9810
0.9910



Parameters (Session):
Parameters (R input):
R code (references can be found in the software module):
library(brglm)
roc.plot <- function (sd, sdc, newplot = TRUE, ...)
{
sall <- sort(c(sd, sdc))
sens <- 0
specc <- 0
for (i in length(sall):1) {
sens <- c(sens, mean(sd >= sall[i], na.rm = T))
specc <- c(specc, mean(sdc >= sall[i], na.rm = T))
}
if (newplot) {
plot(specc, sens, xlim = c(0, 1), ylim = c(0, 1), type = 'l',
xlab = '1-specificity', ylab = 'sensitivity', main = 'ROC plot', ...)
abline(0, 1)
}
else lines(specc, sens, ...)
npoints <- length(sens)
area <- sum(0.5 * (sens[-1] + sens[-npoints]) * (specc[-1] -
specc[-npoints]))
lift <- (sens - specc)[-1]
cutoff <- sall[lift == max(lift)][1]
sensopt <- sens[-1][lift == max(lift)][1]
specopt <- 1 - specc[-1][lift == max(lift)][1]
list(area = area, cutoff = cutoff, sensopt = sensopt, specopt = specopt)
}
roc.analysis <- function (object, newdata = NULL, newplot = TRUE, ...)
{
if (is.null(newdata)) {
sd <- object$fitted[object$y == 1]
sdc <- object$fitted[object$y == 0]
}
else {
sd <- predict(object, newdata, type = 'response')[newdata$y ==
1]
sdc <- predict(object, newdata, type = 'response')[newdata$y ==
0]
}
roc.plot(sd, sdc, newplot, ...)
}
hosmerlem <- function (y, yhat, g = 10)
{
cutyhat <- cut(yhat, breaks = quantile(yhat, probs = seq(0,
1, 1/g)), include.lowest = T)
obs <- xtabs(cbind(1 - y, y) ~ cutyhat)
expect <- xtabs(cbind(1 - yhat, yhat) ~ cutyhat)
chisq <- sum((obs - expect)^2/expect)
P <- 1 - pchisq(chisq, g - 2)
c('X^2' = chisq, Df = g - 2, 'P(>Chi)' = P)
}
x <- as.data.frame(t(y))
r <- brglm(x)
summary(r)
rc <- summary(r)$coeff
try(hm <- hosmerlem(y[1,],r$fitted.values),silent=T)
try(hm,silent=T)
bitmap(file='test0.png')
ra <- roc.analysis(r)
dev.off()
te <- array(0,dim=c(2,99))
for (i in 1:99) {
threshold <- i / 100
numcorr1 <- 0
numfaul1 <- 0
numcorr0 <- 0
numfaul0 <- 0
for (j in 1:length(r$fitted.values)) {
if (y[1,j] > 0.99) {
if (r$fitted.values[j] >= threshold) numcorr1 = numcorr1 + 1 else numfaul1 = numfaul1 + 1
} else {
if (r$fitted.values[j] < threshold) numcorr0 = numcorr0 + 1 else numfaul0 = numfaul0 + 1
}
}
te[1,i] <- numfaul1 / (numfaul1 + numcorr1)
te[2,i] <- numfaul0 / (numfaul0 + numcorr0)
}
bitmap(file='test1.png')
op <- par(mfrow=c(2,2))
plot((1:99)/100,te[1,],xlab='Threshold',ylab='Type I error', main='1 - Specificity')
plot((1:99)/100,te[2,],xlab='Threshold',ylab='Type II error', main='1 - Sensitivity')
plot(te[1,],te[2,],xlab='Type I error',ylab='Type II error', main='(1-Sens.) vs (1-Spec.)')
plot((1:99)/100,te[1,]+te[2,],xlab='Threshold',ylab='Sum of Type I & II error', main='(1-Sens.) + (1-Spec.)')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Coefficients of Bias-Reduced Logistic Regression',5,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.E.',header=TRUE)
a<-table.element(a,'t-stat',header=TRUE)
a<-table.element(a,'2-sided p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:length(rc[,1])) {
a<-table.row.start(a)
a<-table.element(a,labels(rc)[[1]][i],header=TRUE)
a<-table.element(a,rc[i,1])
a<-table.element(a,rc[i,2])
a<-table.element(a,rc[i,3])
a<-table.element(a,2*(1-pt(abs(rc[i,3]),r$df.residual)))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Summary of Bias-Reduced Logistic Regression',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Deviance',1,TRUE)
a<-table.element(a,r$deviance)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Penalized deviance',1,TRUE)
a<-table.element(a,r$penalized.deviance)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Residual Degrees of Freedom',1,TRUE)
a<-table.element(a,r$df.residual)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'ROC Area',1,TRUE)
a<-table.element(a,ra$area)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Hosmer–Lemeshow test',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Chi-square',1,TRUE)
phm <- array('NA',dim=3)
for (i in 1:3) { try(phm[i] <- hm[i],silent=T) }
a<-table.element(a,phm[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Degrees of Freedom',1,TRUE)
a<-table.element(a,phm[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'P(>Chi)',1,TRUE)
a<-table.element(a,phm[3])
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Fit of Logistic Regression',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Index',1,TRUE)
a<-table.element(a,'Actual',1,TRUE)
a<-table.element(a,'Fitted',1,TRUE)
a<-table.element(a,'Error',1,TRUE)
a<-table.row.end(a)
for (i in 1:length(r$fitted.values)) {
a<-table.row.start(a)
a<-table.element(a,i,1,TRUE)
a<-table.element(a,y[1,i])
a<-table.element(a,r$fitted.values[i])
a<-table.element(a,y[1,i]-r$fitted.values[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Type I & II errors for various threshold values',3,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Threshold',1,TRUE)
a<-table.element(a,'Type I',1,TRUE)
a<-table.element(a,'Type II',1,TRUE)
a<-table.row.end(a)
for (i in 1:99) {
a<-table.row.start(a)
a<-table.element(a,i/100,1,TRUE)
a<-table.element(a,te[1,i])
a<-table.element(a,te[2,i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable3.tab')