[Robast-commits] r89 - in pkg: ROptEst/chm ROptEst/inst/scripts RobAStBase/R RobAStBase/chm
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Apr 21 18:59:37 CEST 2008
Author: ruckdeschel
Date: 2008-04-21 18:59:37 +0200 (Mon, 21 Apr 2008)
New Revision: 89
Modified:
pkg/ROptEst/chm/ROptEst.chm
pkg/ROptEst/chm/getInfRobIC.html
pkg/ROptEst/inst/scripts/GumbelLocationModel.R
pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R
pkg/RobAStBase/R/Weights.R
pkg/RobAStBase/R/getRiskIC.R
pkg/RobAStBase/chm/RobAStBase.chm
Log:
%------------------------
RobAStBase:
%------------------------
getRiskIC.R: some minor errors
Weights.R: some "" in first arg to setMethod()
%------------------------
ROptEst:
%------------------------
Some Modifications in scripts
Modified: pkg/ROptEst/chm/ROptEst.chm
===================================================================
(Binary files differ)
Modified: pkg/ROptEst/chm/getInfRobIC.html
===================================================================
--- pkg/ROptEst/chm/getInfRobIC.html 2008-04-21 05:06:31 UTC (rev 88)
+++ pkg/ROptEst/chm/getInfRobIC.html 2008-04-21 16:59:37 UTC (rev 89)
@@ -74,7 +74,7 @@
## S4 method for signature 'UnivariateDistribution,
## asGRisk, UncondNeighborhood':
getInfRobIC(L2deriv, risk, neighbor, symm, Finfo, trafo,
- upper, maxiter, tol, warn)
+ upper, maxiter, tol, warn, noLow = FALSE)
## S4 method for signature 'RealRandVariable, asGRisk,
## ContNeighborhood':
Modified: pkg/ROptEst/inst/scripts/GumbelLocationModel.R
===================================================================
--- pkg/ROptEst/inst/scripts/GumbelLocationModel.R 2008-04-21 05:06:31 UTC (rev 88)
+++ pkg/ROptEst/inst/scripts/GumbelLocationModel.R 2008-04-21 16:59:37 UTC (rev 89)
@@ -78,7 +78,7 @@
(G0.IC5 <- optIC(model=G0.Rob1, risk=asHampel(bound=clip(G0.IC1))))
checkIC(G0.IC5)
Risks(G0.IC5)
-(G0.IC6 <- optIC(model=G0.Rob2, risk=asHampel(bound=Risks(G0.IC2)$asBias), maxiter = 100))
+(G0.IC6 <- optIC(model=G0.Rob2, risk=asHampel(bound=Risks(G0.IC2)$asBias$value), maxiter = 100))
checkIC(G0.IC6)
Risks(G0.IC6)
Modified: pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R
===================================================================
--- pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R 2008-04-21 05:06:31 UTC (rev 88)
+++ pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R 2008-04-21 16:59:37 UTC (rev 89)
@@ -39,6 +39,7 @@
plot(N0.IC1.s)
infoPlot(N0.IC1.s)
+comparePlot(N0.IC1,N0.IC1.i,N0.IC1.s)
# lower case solutions
(N0.IC2 <- optIC(model = N0.Rob1, risk = asBias(), tol = 1e-10))
checkIC(N0.IC2)
Modified: pkg/RobAStBase/R/Weights.R
===================================================================
--- pkg/RobAStBase/R/Weights.R 2008-04-21 05:06:31 UTC (rev 88)
+++ pkg/RobAStBase/R/Weights.R 2008-04-21 16:59:37 UTC (rev 89)
@@ -58,7 +58,7 @@
}
)
-setMethod(getweight,
+setMethod("getweight",
signature(Weight = "HampelWeight", neighbor = "ContNeighborhood",
biastype = "asymmetricBias"),# norm = "missing"),
function(Weight, neighbor, biastype, ...)
@@ -77,7 +77,7 @@
)
-setMethod(getweight,
+setMethod("getweight",
signature(Weight = "BdStWeight", neighbor = "TotalVarNeighborhood",
biastype = "BiasType"),# norm = "missing"),
function(Weight, neighbor, biastype, ...)
@@ -94,7 +94,7 @@
}
)
-setMethod(minbiasweight,
+setMethod("minbiasweight",
signature(Weight = "HampelWeight", neighbor = "ContNeighborhood",
biastype = "BiasType"),# norm = "NormType"),
function(Weight, neighbor, biastype, normW)
@@ -111,7 +111,7 @@
)
-setMethod(minbiasweight,
+setMethod("minbiasweight",
signature(Weight = "HampelWeight", neighbor = "ContNeighborhood",
biastype = "asymmetricBias"),# norm = "missing"),
function(Weight, neighbor, biastype, ...)
@@ -130,7 +130,7 @@
}
)
-setMethod(minbiasweight,
+setMethod("minbiasweight",
signature(Weight = "HampelWeight", neighbor = "ContNeighborhood",
biastype = "onesidedBias"),# norm = "missing"),
function(Weight, neighbor, biastype, ...)
@@ -147,7 +147,7 @@
)
-setMethod(minbiasweight,
+setMethod("minbiasweight",
signature(Weight = "BdStWeight", neighbor = "TotalVarNeighborhood",
biastype = "BiasType"),
function(Weight, neighbor, biastype, ...)
Modified: pkg/RobAStBase/R/getRiskIC.R
===================================================================
--- pkg/RobAStBase/R/getRiskIC.R 2008-04-21 05:06:31 UTC (rev 88)
+++ pkg/RobAStBase/R/getRiskIC.R 2008-04-21 16:59:37 UTC (rev 89)
@@ -5,24 +5,10 @@
risk = "asCov",
neighbor = "missing",
L2Fam = "missing"),
- function(IC, risk, tol = .Machine$double.eps^0.25){
- L2Fam <- eval(IC at CallL2Fam)
+ function(IC, risk, tol = .Machine$double.eps^0.25)
+ getRiskIC(IC = IC, risk = risk, L2Fam = eval(IC at CallL2Fam),
+ tol = tol))
- trafo <- L2Fam at param@trafo
- IC1 <- as(diag(nrow(trafo)) %*% IC at Curve, "EuclRandVariable")
-
- bias <- E(L2Fam, IC1)
- Cov <- E(L2Fam, IC1 %*% t(IC1))
-
- prec <- checkIC(IC, out = FALSE)
- if(prec > tol)
- warning("The maximum deviation from the exact IC properties is", prec,
- "\nThis is larger than the specified 'tol' ",
- "=> the result may be wrong")
-
- return(list(asCov = list(distribution = .getDistr(L2Fam), value = Cov - bias %*% t(bias))))
- })
-
setMethod("getRiskIC", signature(IC = "IC",
risk = "asCov",
neighbor = "missing",
@@ -54,17 +40,10 @@
neighbor = "missing",
L2Fam = "missing"),
function(IC, risk, tol = .Machine$double.eps^0.25){
- trCov <- getRiskIC(IC, risk = asCov())$asCov
- trCov$value <- sum(diag(trCov$value))
-
- prec <- checkIC(IC, out = FALSE)
- if(prec > tol)
- warning("The maximum deviation from the exact IC properties is", prec,
- "\nThis is larger than the specified 'tol' ",
- "=> the result may be wrong")
-
- return(list(trAsCov = trCov))
+ getRiskIC(IC = IC, risk = risk, L2Fam = eval(IC at CallL2Fam),
+ tol = tol)
})
+
setMethod("getRiskIC", signature(IC = "IC",
risk = "trAsCov",
neighbor = "missing",
@@ -73,8 +52,8 @@
if(dimension(Domain(IC at Curve[[1]])) != dimension(img(L2Fam at distribution)))
stop("dimension of 'Domain' of 'Curve' != dimension of 'img' of 'distribution' of 'L2Fam'")
- trCov <- getRiskIC(IC, risk = asCov(), L2Fam = L2Fam)$asCov
- trCov$value <- sum(diag(trCov$value))
+ trCov <- getRiskIC(IC, risk = asCov(), L2Fam = L2Fam)$trCov
+ trCov$value <- sum(diag(std %*% trCov$value))
prec <- checkIC(IC, L2Fam, out = FALSE)
if(prec > tol)
Modified: pkg/RobAStBase/chm/RobAStBase.chm
===================================================================
(Binary files differ)
More information about the Robast-commits
mailing list