[Distr-commits] r253 - in branches/distr-2.0/pkg/distrMod: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 8 19:11:45 CEST 2008
Author: stamats
Date: 2008-08-08 19:11:45 +0200 (Fri, 08 Aug 2008)
New Revision: 253
Modified:
branches/distr-2.0/pkg/distrMod/R/SimpleL2ParamFamilies.R
branches/distr-2.0/pkg/distrMod/R/modifyModel.R
branches/distr-2.0/pkg/distrMod/man/ExpScaleFamily.Rd
Log:
adapted to new implementation, seems to work ...
Modified: branches/distr-2.0/pkg/distrMod/R/SimpleL2ParamFamilies.R
===================================================================
--- branches/distr-2.0/pkg/distrMod/R/SimpleL2ParamFamilies.R 2008-08-08 10:28:16 UTC (rev 252)
+++ branches/distr-2.0/pkg/distrMod/R/SimpleL2ParamFamilies.R 2008-08-08 17:11:45 UTC (rev 253)
@@ -539,22 +539,22 @@
##################################################################
## Exponential scale family
##################################################################
-ExpScaleFamily <- function(rate = 1, trafo){
+ExpScaleFamily <- function(scale = 1, trafo){
if(missing(trafo)) trafo <- matrix(1, dimnames = list("scale","scale"))
- res <- L2ScaleFamily(loc = 0, scale = 1/rate, name = "Exponential scale family",
+ res <- L2ScaleFamily(loc = 0, scale = scale, name = "Exponential scale family",
centraldistribution = Exp(rate = 1),
locscalename = c("loc"="", "scale"="scale"),
modParam = function(theta) Exp(rate = 1/theta),
LogDeriv = function(x) 1,
- L2derivDistr.0 = (Exp(rate = 1)-1)*rate,
+ L2derivDistr.0 = (Exp(rate = 1)-1)/scale,
FisherInfo.0 = matrix(1, dimnames = list("scale","scale")),
distrSymm = NoSymmetry(),
- L2derivSymm = FunSymmList(OddSymmetric(SymmCenter = 1/rate)),
+ L2derivSymm = FunSymmList(OddSymmetric(SymmCenter = scale)),
L2derivDistrSymm = DistrSymmList(NoSymmetry()),
trafo = trafo, .returnClsName = "ExpScaleFamily")
- f.call <- substitute(ExpScaleFamily(rate = r,
+ f.call <- substitute(ExpScaleFamily(scale = s,
trafo = matrix(Tr, dimnames = list("scale","scale"))),
- list(r = rate, Tr = trafo))
+ list(s = scale, Tr = trafo))
res at fam.call <- f.call
return(res)
}
Modified: branches/distr-2.0/pkg/distrMod/R/modifyModel.R
===================================================================
--- branches/distr-2.0/pkg/distrMod/R/modifyModel.R 2008-08-08 10:28:16 UTC (rev 252)
+++ branches/distr-2.0/pkg/distrMod/R/modifyModel.R 2008-08-08 17:11:45 UTC (rev 253)
@@ -94,7 +94,7 @@
names(cl)[cl.l+1] <- loc.name
}
M at fam.call <- cl
- return(M)
+ return(as(M, "L2LocationFamily"))
})
setMethod("modifyModel", signature(model = "L2ScaleFamily",
@@ -128,7 +128,7 @@
names(cl)[cl.l] <- scale.name
}
M at fam.call <- cl
- return(M)
+ return(as(M, "L2ScaleFamily"))
})
setMethod("modifyModel", signature(model = "L2LocationScaleFamily",
@@ -168,7 +168,7 @@
names(cl)[cl.l] <- scale.name
}
M at fam.call <- cl
- return(M)
+ return(as(M, "L2LocationScaleFamily"))
})
setMethod("modifyModel", signature(model = "GammaFamily",
@@ -182,6 +182,6 @@
M at L2derivSymm <- FunSymmList(OddSymmetric(SymmCenter =
prod(main(param))),
NonSymmetric())
- return(M)
+ return(as(M, "GammaFamily"))
})
Modified: branches/distr-2.0/pkg/distrMod/man/ExpScaleFamily.Rd
===================================================================
--- branches/distr-2.0/pkg/distrMod/man/ExpScaleFamily.Rd 2008-08-08 10:28:16 UTC (rev 252)
+++ branches/distr-2.0/pkg/distrMod/man/ExpScaleFamily.Rd 2008-08-08 17:11:45 UTC (rev 253)
@@ -7,10 +7,10 @@
represents an exponential scale family.
}
\usage{
-ExpScaleFamily(rate = 1, trafo)
+ExpScaleFamily(scale = 1, trafo)
}
\arguments{
- \item{rate}{ rate }
+ \item{scale}{ scale (= 1/rate) }
\item{trafo}{ function in \code{param} or matrix: optional transformation of the parameter }
}
\details{
More information about the Distr-commits
mailing list