[Robast-commits] r1285 - pkg/ROptEst/inst/scripts

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 6 22:58:27 CET 2024


Author: ruckdeschel
Date: 2024-02-06 22:58:27 +0100 (Tue, 06 Feb 2024)
New Revision: 1285

Modified:
   pkg/ROptEst/inst/scripts/PoissonModel.R
   pkg/ROptEst/inst/scripts/examples_taking_longer.R
Log:
[ROptEst] in inst/scripts added code to show asymmetric bias with minmaxBias() in PoissonModel.R    , removed left over ")" in examples_taking_longer.R   

Modified: pkg/ROptEst/inst/scripts/PoissonModel.R
===================================================================
--- pkg/ROptEst/inst/scripts/PoissonModel.R	2024-02-06 21:55:50 UTC (rev 1284)
+++ pkg/ROptEst/inst/scripts/PoissonModel.R	2024-02-06 21:58:27 UTC (rev 1285)
@@ -76,6 +76,11 @@
 Risks(IC3.p)
 plot(IC3.p)
 
+(IC3.n <- optIC(model=RobP1, risk=asBias(biastype=negativeBias())))
+checkIC(IC3.n) 
+Risks(IC3.n)
+plot(IC3.n)
+
 (IC3.a <- optIC(model=RobP1, risk=asBias(biastype=asymmetricBias(nu = c(1,0.2)))))
 checkIC(IC3.a)
 Risks(IC3.a)
@@ -87,6 +92,26 @@
 Risks(IC4)
 plot(IC4)
 
+### now with minmaxBias()
+
+PL2deriv <- P at L2derivDistr[[1]]
+
+### todo: make output nicer 
+
+minmaxBias(PL2deriv, neighbor=ContNeighborhood(), biastype=symmetricBias(), 
+           trafo=trafo(P), maxiter=50, tol=.Machine$double.eps^0.4, 
+		   warn=TRUE, Finfo = FisherInfo(P))
+
+minmaxBias(PL2deriv, neighbor=ContNeighborhood(), biastype=positiveBias(), 
+           trafo=trafo(P), maxiter=50, tol=.Machine$double.eps^0.4, 
+		   warn=TRUE, Finfo = FisherInfo(P))
+
+minmaxBias(PL2deriv, neighbor=ContNeighborhood(), biastype=negativeBias(), 
+           trafo=trafo(P), maxiter=50, tol=.Machine$double.eps^0.4, 
+		   warn=TRUE, Finfo = FisherInfo(P))
+
+
+
 ## Hampel solution
 (IC5 <- optIC(model=RobP1, risk=asHampel(bound=clip(IC1))))
 checkIC(IC5)
@@ -131,6 +156,7 @@
 (r.rho2 <- leastFavorableRadius(L2Fam=P, neighbor=TotalVarNeighborhood(),
                     risk=asMSE(), rho=1/3))
 
+
 ## one-step estimation
 ## Example: Rutherford-Geiger (1910)
 ## cf. Feller~(1968), Section VI.7 (a)

Modified: pkg/ROptEst/inst/scripts/examples_taking_longer.R
===================================================================
--- pkg/ROptEst/inst/scripts/examples_taking_longer.R	2024-02-06 21:55:50 UTC (rev 1284)
+++ pkg/ROptEst/inst/scripts/examples_taking_longer.R	2024-02-06 21:58:27 UTC (rev 1285)
@@ -106,4 +106,4 @@
 
 ## only differences in calls  and functional slots, where bodies ...
 
-}
+



More information about the Robast-commits mailing list