[Robast-commits] r1105 - in branches/robast-1.2/pkg/RobAStBase: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Aug 6 20:30:48 CEST 2018
Author: ruckdeschel
Date: 2018-08-06 20:30:48 +0200 (Mon, 06 Aug 2018)
New Revision: 1105
Modified:
branches/robast-1.2/pkg/RobAStBase/R/IC.R
branches/robast-1.2/pkg/RobAStBase/R/kStepEstimator.R
branches/robast-1.2/pkg/RobAStBase/R/move2bckRefParam.R
branches/robast-1.2/pkg/RobAStBase/R/optIC.R
branches/robast-1.2/pkg/RobAStBase/inst/NEWS
branches/robast-1.2/pkg/RobAStBase/man/ContIC-class.Rd
branches/robast-1.2/pkg/RobAStBase/man/ContIC.Rd
branches/robast-1.2/pkg/RobAStBase/man/HampIC-class.Rd
branches/robast-1.2/pkg/RobAStBase/man/IC.Rd
branches/robast-1.2/pkg/RobAStBase/man/TotalVarIC-class.Rd
branches/robast-1.2/pkg/RobAStBase/man/TotalVarIC.Rd
branches/robast-1.2/pkg/RobAStBase/man/makeIC-methods.Rd
Log:
[RobAStBase] branch 1.2:
+ slot function modifyIC of the different IC classes gains
an argument withMakeIC to be able to adjust this to a
higher granularity
Modified: branches/robast-1.2/pkg/RobAStBase/R/IC.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/IC.R 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/R/IC.R 2018-08-06 18:30:48 UTC (rev 1105)
@@ -146,25 +146,23 @@
Y <- as(stand %*% IC1, "EuclRandVariable")
#ICfct <- vector(mode = "list", length = dims)
#ICfct[[1]] <- function(x){Y(x)}
- ..modifnew <- function(L2Fam, IC) return(makeIC(IC,L2Fam))
- if(! ("modifyIC" %in% names(getSlots(class(IC))))){
- modifyIC <- ..modifnew
- }else{
- if(!is.function(IC at modifyIC)){
- modifyIC <- ..modifnew
- }else{
- .modifyIC <- IC at modifyIC
- if(!is.null(attr(IC at modifyIC,"hasMakeICin.modifyIC"))){
- modifyIC <- .modifyIC
- }else{
- modifyIC <- function(L2Fam, IC){ IC. <- .modifyIC(L2Fam, IC)
- return(makeIC(IC., L2Fam)) }
- }
- }
- }
- attr(modifyIC,"hasMakeICin.modifyIC") <- TRUE
+ if(!is.function(IC at modifyIC))
+ IC at modifyIC <- function(L2Fam, IC, withMakeIC) return(makeIC(IC,L2Fam))
+# modifyIC <- ..modifnew
+# }else{
+# .modifyIC <- IC at modifyIC
+# if(!is.null(attr(IC at modifyIC,"hasMakeICin.modifyIC"))){
+# modifyIC <- .modifyIC
+# }else{
+# modifyIC <- function(L2Fam, IC){ IC. <- .modifyIC(L2Fam, IC)
+# return(makeIC(IC., L2Fam)) }
+# }
+# }
+# }
+# attr(modifyIC,"hasMakeICin.modifyIC") <- TRUE
+
CallL2Fam <- L2Fam at fam.call
return(IC(name = name(IC),
@@ -174,7 +172,7 @@
"generated by affine linear trafo to enforce consistency"),
ncol=2, dimnames=list(character(0), c("method", "message"))),
CallL2Fam = CallL2Fam,
- modifyIC = modifyIC))
+ modifyIC = IC at modifyIC))
})
Modified: branches/robast-1.2/pkg/RobAStBase/R/kStepEstimator.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/kStepEstimator.R 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/R/kStepEstimator.R 2018-08-06 18:30:48 UTC (rev 1105)
@@ -145,10 +145,10 @@
L2Fam <- modifyModel(L2Fam, Param,
.withL2derivDistr = L2Fam at .withEvalL2derivDistr)
# print(L2Fam)
- IC <- modifyIC(IC)(L2Fam, IC)
+ IC <- modifyIC(IC)(L2Fam, IC, withMakeIC = FALSE)
if(steps==1L &&withMakeIC){
IC <- makeIC(IC, L2Fam)
- IC at modifyIC <- oldmodifIC
+# IC at modifyIC <- oldmodifIC
}
# print(IC)
}
@@ -246,7 +246,7 @@
L2Fam <- modifyModel(L2Fam, Param,
.withL2derivDistr = L2Fam at .withEvalL2derivDistr)
# print(L2Fam)
- IC <- modifyIC(IC)(L2Fam, IC)
+ IC <- modifyIC(IC)(L2Fam, IC, withMakeIC = withMakeIC)
# print(IC)
}
@@ -278,7 +278,7 @@
L2Fam <- upd$L2Fam
if((i==steps)&&withMakeIC){
IC <- makeIC(IC,L2Fam)
- IC at modifyIC <- modif.old
+# IC at modifyIC <- modif.old
}
Param <- upd$Param
tf <- trafo(L2Fam, Param)
Modified: branches/robast-1.2/pkg/RobAStBase/R/move2bckRefParam.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/move2bckRefParam.R 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/R/move2bckRefParam.R 2018-08-06 18:30:48 UTC (rev 1105)
@@ -109,6 +109,6 @@
setMethod("moveICBackFromRefParam", signature(IC = "HampIC",
L2Fam = "L2ParamFamily"), function(IC, L2Fam, ...){
IC <- moveICBackFromRefParam(as(IC,"IC"), L2Fam,...)
- IC at modifyIC(L2Fam, IC)
+ IC at modifyIC(L2Fam, IC, withMakeIC = FALSE)
return(IC)})
Modified: branches/robast-1.2/pkg/RobAStBase/R/optIC.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/optIC.R 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/R/optIC.R 2018-08-06 18:30:48 UTC (rev 1105)
@@ -6,7 +6,7 @@
Curve <- as((trafo(model at param) %*% solve(model at FisherInfo)) %*% model at L2deriv, "EuclRandVariable")
asCov <- trafo(model at param) %*% solve(model at FisherInfo) %*% t(trafo(model at param))
- modifyIC <- function(L2Fam, IC){ optIC(L2Fam, asCov()) }
+ modifyIC <- function(L2Fam, IC, withMakeIC=FALSE){ optIC(L2Fam, asCov()) }
L2call <- model at fam.call
L2call$trafo <- trafo(model)
IC.o <- IC(
Modified: branches/robast-1.2/pkg/RobAStBase/inst/NEWS
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/inst/NEWS 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/inst/NEWS 2018-08-06 18:30:48 UTC (rev 1105)
@@ -11,8 +11,11 @@
version 1.2
#######################################
+user-visible CHANGES:
++ slot function modifyIC of the different IC classes gains
+ an argument withMakeIC to be able to adjust this to a
+ higher granularity
-
under the hood
+ new S4 (estimator) class "MCALEstimate" containing both
"MCEstimate" and "ALEstimate" to make accessible pIC-methods
Modified: branches/robast-1.2/pkg/RobAStBase/man/ContIC-class.Rd
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/man/ContIC-class.Rd 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/man/ContIC-class.Rd 2018-08-06 18:30:48 UTC (rev 1105)
@@ -41,11 +41,14 @@
\item{\code{Curve}:}{ object of class \code{"EuclRandVarList"}}
+
+
\item{\code{modifyIC}:}{ Object of class \code{"OptionalFunction"}:
- function of two arguments, which are an L2 parametric family
- and an optional influence curve. Returns an object of
- class \code{"IC"}. This slot is mainly used for internal
- computations! }
+ function of three arguments, which are an L2 parametric family
+ and an optional influence curve, and a logical argument
+ whether to enforce the IC side conditions by \code{makeIC}. Returns an object of
+ class \code{"IC"}. This function is mainly used for internal
+ computations! }
\item{\code{Risks}:}{ object of class \code{"list"}:
list of risks; cf. \code{\link[distrMod]{RiskType-class}}. }
Modified: branches/robast-1.2/pkg/RobAStBase/man/ContIC.Rd
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/man/ContIC.Rd 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/man/ContIC.Rd 2018-08-06 18:30:48 UTC (rev 1105)
@@ -40,8 +40,9 @@
\item{biastype}{ BiasType: type of the bias}
\item{normtype}{ NormType: type of the norm}
\item{modifyIC}{ object of class \code{"OptionalFunction"}:
- function of two arguments, which are an L2 parametric family
- and an optional influence curve. Returns an object of
+ function of three arguments, which are an L2 parametric family
+ and an optional influence curve, and a logical argument
+ whether to enforce the IC side conditions by \code{makeIC}. Returns an object of
class \code{"IC"}. This function is mainly used for internal
computations! }
}
Modified: branches/robast-1.2/pkg/RobAStBase/man/HampIC-class.Rd
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/man/HampIC-class.Rd 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/man/HampIC-class.Rd 2018-08-06 18:30:48 UTC (rev 1105)
@@ -32,10 +32,11 @@
\item{\code{Curve}}{ object of class \code{"EuclRandVarList"}}
\item{\code{modifyIC}}{ Object of class \code{"OptionalFunction"}:
- function of two arguments, which are an L2 parametric family
- and an optional influence curve. Returns an object of
- class \code{"IC"}. This slot is mainly used for internal
- computations! }
+ function of three arguments, which are an L2 parametric family
+ and an optional influence curve, and a logical argument
+ whether to enforce the IC side conditions by \code{makeIC}. Returns an object of
+ class \code{"IC"}. This function is mainly used for internal
+ computations! }
\item{\code{Risks}}{ object of class \code{"list"}:
list of risks; cf. \code{\link[distrMod]{RiskType-class}}. }
Modified: branches/robast-1.2/pkg/RobAStBase/man/IC.Rd
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/man/IC.Rd 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/man/IC.Rd 2018-08-06 18:30:48 UTC (rev 1105)
@@ -21,12 +21,12 @@
\item{Infos}{ matrix of characters with two columns
named \code{method} and \code{message}: additional informations. }
\item{modifyIC}{ Object of class \code{"OptionalFunction"}:
- function of two arguments, which are an L2 parametric family
- and an optional influence curve. Returns an object of
- class \code{"IC"} at the parameter value of the L2 parametric
- family. This function is mainly used for internal
+ function of three arguments, which are an L2 parametric family
+ and an optional influence curve, and a logical argument
+ whether to enforce the IC side conditions by \code{makeIC}. Returns an object of
+ class \code{"IC"}. This function is mainly used for internal
computations! }
-}
+ }
%\details{}
\value{Object of class \code{"IC"}}
\references{
Modified: branches/robast-1.2/pkg/RobAStBase/man/TotalVarIC-class.Rd
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/man/TotalVarIC-class.Rd 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/man/TotalVarIC-class.Rd 2018-08-06 18:30:48 UTC (rev 1105)
@@ -42,10 +42,11 @@
\item{\code{Curve}}{ object of class \code{"EuclRandVarList"}.}
\item{\code{modifyIC}}{ Object of class \code{"OptionalFunction"}:
- function of two arguments, which are an L2 parametric family
- and an optional influence curve. Returns an object of
- class \code{"IC"}. This slot is mainly used for internal
- computations! }
+ function of three arguments, which are an L2 parametric family
+ and an optional influence curve, and a logical argument
+ whether to enforce the IC side conditions by \code{makeIC}. Returns an object of
+ class \code{"IC"}. This function is mainly used for internal
+ computations! }
\item{\code{Risks}}{ object of class \code{"list"}:
list of risks; cf. \code{\link[distrMod]{RiskType-class}}. }
Modified: branches/robast-1.2/pkg/RobAStBase/man/TotalVarIC.Rd
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/man/TotalVarIC.Rd 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/man/TotalVarIC.Rd 2018-08-06 18:30:48 UTC (rev 1105)
@@ -40,8 +40,9 @@
\item{biastype}{ BiasType: type of the bias}
\item{normtype}{ NormType: type of the norm}
\item{modifyIC}{ object of class \code{"OptionalFunction"}:
- function of two arguments, which are an L2 parametric family
- and an optional influence curve. Returns an object of
+ function of three arguments, which are an L2 parametric family
+ and an optional influence curve, and a logical argument
+ whether to enforce the IC side conditions by \code{makeIC}. Returns an object of
class \code{"IC"}. This function is mainly used for internal
computations! }
}
Modified: branches/robast-1.2/pkg/RobAStBase/man/makeIC-methods.Rd
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/man/makeIC-methods.Rd 2018-08-06 14:42:33 UTC (rev 1104)
+++ branches/robast-1.2/pkg/RobAStBase/man/makeIC-methods.Rd 2018-08-06 18:30:48 UTC (rev 1105)
@@ -33,10 +33,10 @@
\item{Infos}{ matrix of characters with two columns
named \code{method} and \code{message}: additional informations. }
\item{modifyIC}{ Object of class \code{"OptionalFunction"}:
- function of two arguments, which are an L2 parametric family
- and an optional influence curve. Returns an object of
- class \code{"IC"} at the parameter value of the L2 parametric
- family. This function is mainly used for internal
+ function of three arguments, which are an L2 parametric family
+ and an optional influence curve, and a logical argument
+ whether to enforce the IC side conditions by \code{makeIC}. Returns an object of
+ class \code{"IC"}. This function is mainly used for internal
computations! }
\item{\dots}{ additional parameters }
}
More information about the Robast-commits
mailing list