Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_logisticregression.wasp
Title produced by softwareBias-Reduced Logistic Regression
Date of computationFri, 15 Mar 2013 11:03:25 -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/Mar/15/t1363359833lk596w9nmo4l0jr.htm/, Retrieved Sun, 28 Apr 2024 11:06:33 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=207833, Retrieved Sun, 28 Apr 2024 11:06:33 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact185
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Bias-Reduced Logistic Regression] [sample logistic r...] [2013-03-15 15:03:25] [a9208f4f8d3b118336aae915785f2bd9] [Current]
Feedback Forum

Post a new message
Dataseries X:
1	99.2	96.7	101
1	99	98.1	100.1
1	100	100	100
1	111.6	104.9	90.6
1	122.2	104.9	86.5
1	117.6	109.5	89.7
1	121.1	110.8	90.6
1	136	112.3	82.8
1	154.2	109.3	70.1
1	153.6	105.3	65.4
1	158.5	101.7	61.3
0	140.6	95.4	62.5
0	136.2	96.4	63.6
0	168	97.6	52.6
0	154.3	102.4	59.7
0	149	101.6	59.5
0	165.5	103.8	61.3




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ fisher.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 & 3 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ fisher.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=207833&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ fisher.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=207833&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=207833&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 time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ fisher.wessa.net







Coefficients of Bias-Reduced Logistic Regression
VariableParameterS.E.t-stat2-sided p-value
(Intercept)-34.098694084867123.6681280275447-1.44070093102350.173318283094146
X10.04522288176420390.1312258956404810.3446185796140480.735892431342672
X20.1680063434751430.2455432379220890.6842230512918940.505849335612264
X30.152276191031620.1870420752466790.8141280021128490.430232615868377

\begin{tabular}{lllllllll}
\hline
Coefficients of Bias-Reduced Logistic Regression \tabularnewline
Variable & Parameter & S.E. & t-stat & 2-sided p-value \tabularnewline
(Intercept) & -34.0986940848671 & 23.6681280275447 & -1.4407009310235 & 0.173318283094146 \tabularnewline
X1 & 0.0452228817642039 & 0.131225895640481 & 0.344618579614048 & 0.735892431342672 \tabularnewline
X2 & 0.168006343475143 & 0.245543237922089 & 0.684223051291894 & 0.505849335612264 \tabularnewline
X3 & 0.15227619103162 & 0.187042075246679 & 0.814128002112849 & 0.430232615868377 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=207833&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]-34.0986940848671[/C][C]23.6681280275447[/C][C]-1.4407009310235[/C][C]0.173318283094146[/C][/ROW]
[ROW][C]X1[/C][C]0.0452228817642039[/C][C]0.131225895640481[/C][C]0.344618579614048[/C][C]0.735892431342672[/C][/ROW]
[ROW][C]X2[/C][C]0.168006343475143[/C][C]0.245543237922089[/C][C]0.684223051291894[/C][C]0.505849335612264[/C][/ROW]
[ROW][C]X3[/C][C]0.15227619103162[/C][C]0.187042075246679[/C][C]0.814128002112849[/C][C]0.430232615868377[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=207833&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=207833&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)-34.098694084867123.6681280275447-1.44070093102350.173318283094146
X10.04522288176420390.1312258956404810.3446185796140480.735892431342672
X20.1680063434751430.2455432379220890.6842230512918940.505849335612264
X30.152276191031620.1870420752466790.8141280021128490.430232615868377







Summary of Bias-Reduced Logistic Regression
Deviance7.86851242762322
Penalized deviance-6.46292909339905
Residual Degrees of Freedom13
ROC Area0.984848484848485
Hosmer–Lemeshow test
Chi-square2.40652705692976
Degrees of Freedom8
P(>Chi)0.965947247529653

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

[TABLE]
[ROW][C]Summary of Bias-Reduced Logistic Regression[/C][/ROW]
[ROW][C]Deviance[/C][C]7.86851242762322[/C][/ROW]
[ROW][C]Penalized deviance[/C][C]-6.46292909339905[/C][/ROW]
[ROW][C]Residual Degrees of Freedom[/C][C]13[/C][/ROW]
[ROW][C]ROC Area[/C][C]0.984848484848485[/C][/ROW]
[ROW][C]Hosmer–Lemeshow test[/C][/ROW]
[ROW][C]Chi-square[/C][C]2.40652705692976[/C][/ROW]
[ROW][C]Degrees of Freedom[/C][C]8[/C][/ROW]
[ROW][C]P(>Chi)[/C][C]0.965947247529653[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=207833&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=207833&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
Deviance7.86851242762322
Penalized deviance-6.46292909339905
Residual Degrees of Freedom13
ROC Area0.984848484848485
Hosmer–Lemeshow test
Chi-square2.40652705692976
Degrees of Freedom8
P(>Chi)0.965947247529653







Fit of Logistic Regression
IndexActualFittedError
110.8822097661325160.117790233867484
210.8911595301626770.108840469837323
310.9206964530704560.0793035469295442
410.9143753431461250.0856246568538754
510.9023222587021630.0976777412978368
610.9635746764885080.0364253235114922
710.9778847122954930.0221152877045071
810.971451829341230.0285481706587701
910.8712805298280250.128719470171975
1010.6218649207195380.378135079280462
1110.3751720330060180.624827966993982
1200.100174264607698-0.100174264607698
1300.11317018724893-0.11317018724893
1400.109671283683413-0.109671283683413
1500.304477694122992-0.304477694122992
1600.226075232440963-0.226075232440963
1700.539736476184375-0.539736476184375

\begin{tabular}{lllllllll}
\hline
Fit of Logistic Regression \tabularnewline
Index & Actual & Fitted & Error \tabularnewline
1 & 1 & 0.882209766132516 & 0.117790233867484 \tabularnewline
2 & 1 & 0.891159530162677 & 0.108840469837323 \tabularnewline
3 & 1 & 0.920696453070456 & 0.0793035469295442 \tabularnewline
4 & 1 & 0.914375343146125 & 0.0856246568538754 \tabularnewline
5 & 1 & 0.902322258702163 & 0.0976777412978368 \tabularnewline
6 & 1 & 0.963574676488508 & 0.0364253235114922 \tabularnewline
7 & 1 & 0.977884712295493 & 0.0221152877045071 \tabularnewline
8 & 1 & 0.97145182934123 & 0.0285481706587701 \tabularnewline
9 & 1 & 0.871280529828025 & 0.128719470171975 \tabularnewline
10 & 1 & 0.621864920719538 & 0.378135079280462 \tabularnewline
11 & 1 & 0.375172033006018 & 0.624827966993982 \tabularnewline
12 & 0 & 0.100174264607698 & -0.100174264607698 \tabularnewline
13 & 0 & 0.11317018724893 & -0.11317018724893 \tabularnewline
14 & 0 & 0.109671283683413 & -0.109671283683413 \tabularnewline
15 & 0 & 0.304477694122992 & -0.304477694122992 \tabularnewline
16 & 0 & 0.226075232440963 & -0.226075232440963 \tabularnewline
17 & 0 & 0.539736476184375 & -0.539736476184375 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=207833&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.882209766132516[/C][C]0.117790233867484[/C][/ROW]
[ROW][C]2[/C][C]1[/C][C]0.891159530162677[/C][C]0.108840469837323[/C][/ROW]
[ROW][C]3[/C][C]1[/C][C]0.920696453070456[/C][C]0.0793035469295442[/C][/ROW]
[ROW][C]4[/C][C]1[/C][C]0.914375343146125[/C][C]0.0856246568538754[/C][/ROW]
[ROW][C]5[/C][C]1[/C][C]0.902322258702163[/C][C]0.0976777412978368[/C][/ROW]
[ROW][C]6[/C][C]1[/C][C]0.963574676488508[/C][C]0.0364253235114922[/C][/ROW]
[ROW][C]7[/C][C]1[/C][C]0.977884712295493[/C][C]0.0221152877045071[/C][/ROW]
[ROW][C]8[/C][C]1[/C][C]0.97145182934123[/C][C]0.0285481706587701[/C][/ROW]
[ROW][C]9[/C][C]1[/C][C]0.871280529828025[/C][C]0.128719470171975[/C][/ROW]
[ROW][C]10[/C][C]1[/C][C]0.621864920719538[/C][C]0.378135079280462[/C][/ROW]
[ROW][C]11[/C][C]1[/C][C]0.375172033006018[/C][C]0.624827966993982[/C][/ROW]
[ROW][C]12[/C][C]0[/C][C]0.100174264607698[/C][C]-0.100174264607698[/C][/ROW]
[ROW][C]13[/C][C]0[/C][C]0.11317018724893[/C][C]-0.11317018724893[/C][/ROW]
[ROW][C]14[/C][C]0[/C][C]0.109671283683413[/C][C]-0.109671283683413[/C][/ROW]
[ROW][C]15[/C][C]0[/C][C]0.304477694122992[/C][C]-0.304477694122992[/C][/ROW]
[ROW][C]16[/C][C]0[/C][C]0.226075232440963[/C][C]-0.226075232440963[/C][/ROW]
[ROW][C]17[/C][C]0[/C][C]0.539736476184375[/C][C]-0.539736476184375[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=207833&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=207833&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.8822097661325160.117790233867484
210.8911595301626770.108840469837323
310.9206964530704560.0793035469295442
410.9143753431461250.0856246568538754
510.9023222587021630.0976777412978368
610.9635746764885080.0364253235114922
710.9778847122954930.0221152877045071
810.971451829341230.0285481706587701
910.8712805298280250.128719470171975
1010.6218649207195380.378135079280462
1110.3751720330060180.624827966993982
1200.100174264607698-0.100174264607698
1300.11317018724893-0.11317018724893
1400.109671283683413-0.109671283683413
1500.304477694122992-0.304477694122992
1600.226075232440963-0.226075232440963
1700.539736476184375-0.539736476184375







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.1100.666666666666667
0.1200.5
0.1300.5
0.1400.5
0.1500.5
0.1600.5
0.1700.5
0.1800.5
0.1900.5
0.200.5
0.2100.5
0.2200.5
0.2300.333333333333333
0.2400.333333333333333
0.2500.333333333333333
0.2600.333333333333333
0.2700.333333333333333
0.2800.333333333333333
0.2900.333333333333333
0.300.333333333333333
0.3100.166666666666667
0.3200.166666666666667
0.3300.166666666666667
0.3400.166666666666667
0.3500.166666666666667
0.3600.166666666666667
0.3700.166666666666667
0.380.09090909090909090.166666666666667
0.390.09090909090909090.166666666666667
0.40.09090909090909090.166666666666667
0.410.09090909090909090.166666666666667
0.420.09090909090909090.166666666666667
0.430.09090909090909090.166666666666667
0.440.09090909090909090.166666666666667
0.450.09090909090909090.166666666666667
0.460.09090909090909090.166666666666667
0.470.09090909090909090.166666666666667
0.480.09090909090909090.166666666666667
0.490.09090909090909090.166666666666667
0.50.09090909090909090.166666666666667
0.510.09090909090909090.166666666666667
0.520.09090909090909090.166666666666667
0.530.09090909090909090.166666666666667
0.540.09090909090909090
0.550.09090909090909090
0.560.09090909090909090
0.570.09090909090909090
0.580.09090909090909090
0.590.09090909090909090
0.60.09090909090909090
0.610.09090909090909090
0.620.09090909090909090
0.630.1818181818181820
0.640.1818181818181820
0.650.1818181818181820
0.660.1818181818181820
0.670.1818181818181820
0.680.1818181818181820
0.690.1818181818181820
0.70.1818181818181820
0.710.1818181818181820
0.720.1818181818181820
0.730.1818181818181820
0.740.1818181818181820
0.750.1818181818181820
0.760.1818181818181820
0.770.1818181818181820
0.780.1818181818181820
0.790.1818181818181820
0.80.1818181818181820
0.810.1818181818181820
0.820.1818181818181820
0.830.1818181818181820
0.840.1818181818181820
0.850.1818181818181820
0.860.1818181818181820
0.870.1818181818181820
0.880.2727272727272730
0.890.3636363636363640
0.90.4545454545454550
0.910.5454545454545450
0.920.6363636363636360
0.930.7272727272727270
0.940.7272727272727270
0.950.7272727272727270
0.960.7272727272727270
0.970.8181818181818180
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 & 0.666666666666667 \tabularnewline
0.12 & 0 & 0.5 \tabularnewline
0.13 & 0 & 0.5 \tabularnewline
0.14 & 0 & 0.5 \tabularnewline
0.15 & 0 & 0.5 \tabularnewline
0.16 & 0 & 0.5 \tabularnewline
0.17 & 0 & 0.5 \tabularnewline
0.18 & 0 & 0.5 \tabularnewline
0.19 & 0 & 0.5 \tabularnewline
0.2 & 0 & 0.5 \tabularnewline
0.21 & 0 & 0.5 \tabularnewline
0.22 & 0 & 0.5 \tabularnewline
0.23 & 0 & 0.333333333333333 \tabularnewline
0.24 & 0 & 0.333333333333333 \tabularnewline
0.25 & 0 & 0.333333333333333 \tabularnewline
0.26 & 0 & 0.333333333333333 \tabularnewline
0.27 & 0 & 0.333333333333333 \tabularnewline
0.28 & 0 & 0.333333333333333 \tabularnewline
0.29 & 0 & 0.333333333333333 \tabularnewline
0.3 & 0 & 0.333333333333333 \tabularnewline
0.31 & 0 & 0.166666666666667 \tabularnewline
0.32 & 0 & 0.166666666666667 \tabularnewline
0.33 & 0 & 0.166666666666667 \tabularnewline
0.34 & 0 & 0.166666666666667 \tabularnewline
0.35 & 0 & 0.166666666666667 \tabularnewline
0.36 & 0 & 0.166666666666667 \tabularnewline
0.37 & 0 & 0.166666666666667 \tabularnewline
0.38 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.39 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.4 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.41 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.42 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.43 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.44 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.45 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.46 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.47 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.48 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.49 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.5 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.51 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.52 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.53 & 0.0909090909090909 & 0.166666666666667 \tabularnewline
0.54 & 0.0909090909090909 & 0 \tabularnewline
0.55 & 0.0909090909090909 & 0 \tabularnewline
0.56 & 0.0909090909090909 & 0 \tabularnewline
0.57 & 0.0909090909090909 & 0 \tabularnewline
0.58 & 0.0909090909090909 & 0 \tabularnewline
0.59 & 0.0909090909090909 & 0 \tabularnewline
0.6 & 0.0909090909090909 & 0 \tabularnewline
0.61 & 0.0909090909090909 & 0 \tabularnewline
0.62 & 0.0909090909090909 & 0 \tabularnewline
0.63 & 0.181818181818182 & 0 \tabularnewline
0.64 & 0.181818181818182 & 0 \tabularnewline
0.65 & 0.181818181818182 & 0 \tabularnewline
0.66 & 0.181818181818182 & 0 \tabularnewline
0.67 & 0.181818181818182 & 0 \tabularnewline
0.68 & 0.181818181818182 & 0 \tabularnewline
0.69 & 0.181818181818182 & 0 \tabularnewline
0.7 & 0.181818181818182 & 0 \tabularnewline
0.71 & 0.181818181818182 & 0 \tabularnewline
0.72 & 0.181818181818182 & 0 \tabularnewline
0.73 & 0.181818181818182 & 0 \tabularnewline
0.74 & 0.181818181818182 & 0 \tabularnewline
0.75 & 0.181818181818182 & 0 \tabularnewline
0.76 & 0.181818181818182 & 0 \tabularnewline
0.77 & 0.181818181818182 & 0 \tabularnewline
0.78 & 0.181818181818182 & 0 \tabularnewline
0.79 & 0.181818181818182 & 0 \tabularnewline
0.8 & 0.181818181818182 & 0 \tabularnewline
0.81 & 0.181818181818182 & 0 \tabularnewline
0.82 & 0.181818181818182 & 0 \tabularnewline
0.83 & 0.181818181818182 & 0 \tabularnewline
0.84 & 0.181818181818182 & 0 \tabularnewline
0.85 & 0.181818181818182 & 0 \tabularnewline
0.86 & 0.181818181818182 & 0 \tabularnewline
0.87 & 0.181818181818182 & 0 \tabularnewline
0.88 & 0.272727272727273 & 0 \tabularnewline
0.89 & 0.363636363636364 & 0 \tabularnewline
0.9 & 0.454545454545455 & 0 \tabularnewline
0.91 & 0.545454545454545 & 0 \tabularnewline
0.92 & 0.636363636363636 & 0 \tabularnewline
0.93 & 0.727272727272727 & 0 \tabularnewline
0.94 & 0.727272727272727 & 0 \tabularnewline
0.95 & 0.727272727272727 & 0 \tabularnewline
0.96 & 0.727272727272727 & 0 \tabularnewline
0.97 & 0.818181818181818 & 0 \tabularnewline
0.98 & 1 & 0 \tabularnewline
0.99 & 1 & 0 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=207833&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]0.666666666666667[/C][/ROW]
[ROW][C]0.12[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]0.13[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]0.14[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]0.15[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]0.16[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]0.17[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]0.18[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]0.19[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]0.2[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]0.21[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]0.22[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]0.23[/C][C]0[/C][C]0.333333333333333[/C][/ROW]
[ROW][C]0.24[/C][C]0[/C][C]0.333333333333333[/C][/ROW]
[ROW][C]0.25[/C][C]0[/C][C]0.333333333333333[/C][/ROW]
[ROW][C]0.26[/C][C]0[/C][C]0.333333333333333[/C][/ROW]
[ROW][C]0.27[/C][C]0[/C][C]0.333333333333333[/C][/ROW]
[ROW][C]0.28[/C][C]0[/C][C]0.333333333333333[/C][/ROW]
[ROW][C]0.29[/C][C]0[/C][C]0.333333333333333[/C][/ROW]
[ROW][C]0.3[/C][C]0[/C][C]0.333333333333333[/C][/ROW]
[ROW][C]0.31[/C][C]0[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.32[/C][C]0[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.33[/C][C]0[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.34[/C][C]0[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.35[/C][C]0[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.36[/C][C]0[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.37[/C][C]0[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.38[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.39[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.4[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.41[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.42[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.43[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.44[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.45[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.46[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.47[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.48[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.49[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.5[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.51[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.52[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.53[/C][C]0.0909090909090909[/C][C]0.166666666666667[/C][/ROW]
[ROW][C]0.54[/C][C]0.0909090909090909[/C][C]0[/C][/ROW]
[ROW][C]0.55[/C][C]0.0909090909090909[/C][C]0[/C][/ROW]
[ROW][C]0.56[/C][C]0.0909090909090909[/C][C]0[/C][/ROW]
[ROW][C]0.57[/C][C]0.0909090909090909[/C][C]0[/C][/ROW]
[ROW][C]0.58[/C][C]0.0909090909090909[/C][C]0[/C][/ROW]
[ROW][C]0.59[/C][C]0.0909090909090909[/C][C]0[/C][/ROW]
[ROW][C]0.6[/C][C]0.0909090909090909[/C][C]0[/C][/ROW]
[ROW][C]0.61[/C][C]0.0909090909090909[/C][C]0[/C][/ROW]
[ROW][C]0.62[/C][C]0.0909090909090909[/C][C]0[/C][/ROW]
[ROW][C]0.63[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.64[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.65[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.66[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.67[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.68[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.69[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.7[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.71[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.72[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.73[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.74[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.75[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.76[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.77[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.78[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.79[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.8[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.81[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.82[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.83[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.84[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.85[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.86[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.87[/C][C]0.181818181818182[/C][C]0[/C][/ROW]
[ROW][C]0.88[/C][C]0.272727272727273[/C][C]0[/C][/ROW]
[ROW][C]0.89[/C][C]0.363636363636364[/C][C]0[/C][/ROW]
[ROW][C]0.9[/C][C]0.454545454545455[/C][C]0[/C][/ROW]
[ROW][C]0.91[/C][C]0.545454545454545[/C][C]0[/C][/ROW]
[ROW][C]0.92[/C][C]0.636363636363636[/C][C]0[/C][/ROW]
[ROW][C]0.93[/C][C]0.727272727272727[/C][C]0[/C][/ROW]
[ROW][C]0.94[/C][C]0.727272727272727[/C][C]0[/C][/ROW]
[ROW][C]0.95[/C][C]0.727272727272727[/C][C]0[/C][/ROW]
[ROW][C]0.96[/C][C]0.727272727272727[/C][C]0[/C][/ROW]
[ROW][C]0.97[/C][C]0.818181818181818[/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=207833&T=4

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=207833&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.1100.666666666666667
0.1200.5
0.1300.5
0.1400.5
0.1500.5
0.1600.5
0.1700.5
0.1800.5
0.1900.5
0.200.5
0.2100.5
0.2200.5
0.2300.333333333333333
0.2400.333333333333333
0.2500.333333333333333
0.2600.333333333333333
0.2700.333333333333333
0.2800.333333333333333
0.2900.333333333333333
0.300.333333333333333
0.3100.166666666666667
0.3200.166666666666667
0.3300.166666666666667
0.3400.166666666666667
0.3500.166666666666667
0.3600.166666666666667
0.3700.166666666666667
0.380.09090909090909090.166666666666667
0.390.09090909090909090.166666666666667
0.40.09090909090909090.166666666666667
0.410.09090909090909090.166666666666667
0.420.09090909090909090.166666666666667
0.430.09090909090909090.166666666666667
0.440.09090909090909090.166666666666667
0.450.09090909090909090.166666666666667
0.460.09090909090909090.166666666666667
0.470.09090909090909090.166666666666667
0.480.09090909090909090.166666666666667
0.490.09090909090909090.166666666666667
0.50.09090909090909090.166666666666667
0.510.09090909090909090.166666666666667
0.520.09090909090909090.166666666666667
0.530.09090909090909090.166666666666667
0.540.09090909090909090
0.550.09090909090909090
0.560.09090909090909090
0.570.09090909090909090
0.580.09090909090909090
0.590.09090909090909090
0.60.09090909090909090
0.610.09090909090909090
0.620.09090909090909090
0.630.1818181818181820
0.640.1818181818181820
0.650.1818181818181820
0.660.1818181818181820
0.670.1818181818181820
0.680.1818181818181820
0.690.1818181818181820
0.70.1818181818181820
0.710.1818181818181820
0.720.1818181818181820
0.730.1818181818181820
0.740.1818181818181820
0.750.1818181818181820
0.760.1818181818181820
0.770.1818181818181820
0.780.1818181818181820
0.790.1818181818181820
0.80.1818181818181820
0.810.1818181818181820
0.820.1818181818181820
0.830.1818181818181820
0.840.1818181818181820
0.850.1818181818181820
0.860.1818181818181820
0.870.1818181818181820
0.880.2727272727272730
0.890.3636363636363640
0.90.4545454545454550
0.910.5454545454545450
0.920.6363636363636360
0.930.7272727272727270
0.940.7272727272727270
0.950.7272727272727270
0.960.7272727272727270
0.970.8181818181818180
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')