[Yuima-commits] r245 - pkg/yuima/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Oct 10 16:41:57 CEST 2013
Author: abrouste
Date: 2013-10-10 16:41:57 +0200 (Thu, 10 Oct 2013)
New Revision: 245
Added:
pkg/yuima/man/mmfrac.Rd
pkg/yuima/man/qgv.Rd
Modified:
pkg/yuima/man/setModel.Rd
pkg/yuima/man/simulate.Rd
pkg/yuima/man/yuima.model-class.Rd
Log:
Fractional estimation
Added: pkg/yuima/man/mmfrac.Rd
===================================================================
--- pkg/yuima/man/mmfrac.Rd (rev 0)
+++ pkg/yuima/man/mmfrac.Rd 2013-10-10 14:41:57 UTC (rev 245)
@@ -0,0 +1,118 @@
+\name{mmfrac}
+\alias{mmfrac}
+%- Also NEED an '\alias' for EACH other topic documented here.
+\title{
+mmfrac
+}
+\description{
+%% ~~ A concise (1-5 lines) description of what the function does. ~~
+}
+\usage{
+mmfrac(yuima, ...)
+}
+%- maybe also 'usage' for other objects documented here.
+\arguments{
+ \item{yuima}{
+%% ~~Describe \code{yuima} here~~
+}
+ \item{\dots}{
+%% ~~Describe \code{\dots} here~~
+}
+}
+\details{
+%% ~~ If necessary, more details than the description above ~~
+}
+\value{
+%% ~Describe the value returned
+%% If it is a LIST, use
+%% \item{comp1 }{Description of 'comp1'}
+%% \item{comp2 }{Description of 'comp2'}
+%% ...
+}
+\references{
+%% ~put references to the literature/web site here ~
+}
+\author{
+%% ~~who you are~~
+}
+\note{
+%% ~~further notes~~
+}
+
+%% ~Make other sections like Warning with \section{Warning }{....} ~
+
+\seealso{
+%% ~~objects to See Also as \code{\link{help}}, ~~~
+}
+\examples{
+##---- Should be DIRECTLY executable !! ----
+##-- ==> Define data, use random,
+##-- or do help(data=index) for the standard data sets.
+
+## The function is currently defined as
+function (yuima, ...)
+{
+ call <- match.call()
+ if (missing(yuima)) {
+ yuima.stop("yuima object is missing.")
+ }
+ if (class(yuima) != "yuima") {
+ yuima.stop("an object of class yuima is needed.")
+ }
+ Ddiffx0 <- D(yuima at model@diffusion[[1]], yuima at model@state.variable) ==
+ 0
+ Ddifft0 <- D(yuima at model@diffusion[[1]], yuima at model@time.variable) ==
+ 0
+ bconst <- FALSE
+ Hconst <- FALSE
+ diffnoparam <- length(yuima at model@parameter at diffusion) ==
+ 0
+ if (Ddiffx0 & Ddifft0 & diffnoparam) {
+ if (eval(yuima at model@diffusion[[1]]) == 0) {
+ yuima.stop("the model has no fractional part.")
+ }
+ }
+ if (length(yuima at model@parameter at drift) != 1) {
+ yuima.stop("the drift is malformed.")
+ }
+ dx <- D(yuima at model@drift, yuima at model@state.variable)
+ dbx <- D(yuima at model@diffusion[[1]], yuima at model@state.variable) ==
+ 0
+ dbt <- D(yuima at model@diffusion[[1]], yuima at model@time.variable) ==
+ 0
+ bxx <- D(dx, yuima at model@state.variable) == 0
+ bmix <- D(dx, yuima at model@time.variable) == 0
+ isfOU <- (bxx || bmix) && (dbx && dbt)
+ if (!isfOU) {
+ yuima.stop("estimation not available for this model")
+ }
+ process <- yuima at data@zoo.data[[1]]
+ T <- yuima at sampling@Terminal
+ est <- qgv(yuima, ...)
+ H <- est$coeff[1]
+ sigma <- est$coeff[2]
+ if ((!is.na(H)) & (!is.na(sigma))) {
+ theta <- (2 * mean(process^2)/(sigma^2 * gamma(2 * H +
+ 1)))^(-1/2/H)
+ sH <- sqrt((4 * H - 1) * (1 + (gamma(1 - 4 * H) * gamma(4 *
+ H - 1))/(gamma(2 - 2 * H) * gamma(2 * H))))
+ sdtheta <- sqrt(theta) * (sH/(2 * H))/sqrt(T)
+ }
+ else {
+ yuima.warn("Diffusion estimation not available, can not estimate the drift parameter")
+ }
+ x <- c(est$coeff, theta)
+ names(x) <- c(names(est$coeff), yuima at model@parameter at drift)
+ sdx <- matrix(, 3, 3)
+ diag(sdx) <- c(diag(est$vcov), sdtheta)
+ colnames(sdx) <- names(x)
+ rownames(sdx) <- names(x)
+ obj <- list(coefficients = x, vcov = sdx, call = call)
+ class(obj) <- "mmfrac"
+ return(obj)
+ }
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ ~kwd1 }
+\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
Added: pkg/yuima/man/qgv.Rd
===================================================================
--- pkg/yuima/man/qgv.Rd (rev 0)
+++ pkg/yuima/man/qgv.Rd 2013-10-10 14:41:57 UTC (rev 245)
@@ -0,0 +1,53 @@
+\name{qgv}
+\alias{qgv}
+\title{qgv}
+\description{Estimate the local Holder exponent with quadratic generalized variations method}
+\usage{
+qgv(yuima, filter.type = "Daubechies", order = 2, a = NULL, ...)
+}
+%- maybe also 'usage' for other objects documented here.
+\arguments{
+ \item{yuima}{A \code{yuima} object.}
+ \item{filter.type}{ The \code{filter.type} can be set to \code{"Daubechies"} or
+\code{"Classical"}.
+}
+ \item{order}{The order of the filter \code{a} to be chosen}
+}
+ \item{a}{Any other filter}
+}
+ \item{\dots}{
+%% ~~Describe \code{\dots} here~~
+}
+}
+\details{
+%% ~~ If necessary, more details than the description above ~~
+}
+\value{
+%% ~Describe the value returned
+%% If it is a LIST, use
+%% \item{comp1 }{Description of 'comp1'}
+%% \item{comp2 }{Description of 'comp2'}
+%% ...
+}
+\references{
+%% ~put references to the literature/web site here ~
+}
+\author{
+%% ~~who you are~~
+}
+\note{
+%% ~~further notes~~
+}
+
+%% ~Make other sections like Warning with \section{Warning }{....} ~
+
+\seealso{
+%% ~~objects to See Also as \code{\link{help}}, ~~~
+}
+\examples{
+#Example
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ ~kwd1 }
+\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
Modified: pkg/yuima/man/setModel.Rd
===================================================================
--- pkg/yuima/man/setModel.Rd 2013-10-10 14:41:32 UTC (rev 244)
+++ pkg/yuima/man/setModel.Rd 2013-10-10 14:41:57 UTC (rev 245)
@@ -29,11 +29,11 @@
\arguments{
\item{drift}{a vector of \code{expression}s (the default value is 0 when
\code{drift=NULL}).}
- \item{diffusion}{a matrix of \code{expression}s (the default value is 1 when
+ \item{diffusion}{a matrix of \code{expression}s (the default value is 0 when
\code{diffusion=NULL}).}
\item{hurst}{the Hurst parameter of the gaussian noise. If \code{h=0.5}, the default,
the process is Wiener otherwise it is fractional Brownian motion with that precise value
- of the Hurst index.}
+ of the Hurst index. Can be set to \code{NA} for further specification.}
\item{jump.coeff}{a matrix of \code{expression}s for the jump component.}
\item{measure}{Levy measure for jump variables.}
\item{measure.type}{type specification for Levy measures.}
Modified: pkg/yuima/man/simulate.Rd
===================================================================
--- pkg/yuima/man/simulate.Rd 2013-10-10 14:41:32 UTC (rev 244)
+++ pkg/yuima/man/simulate.Rd 2013-10-10 14:41:57 UTC (rev 245)
@@ -4,7 +4,7 @@
\description{Simulate multi-dimensional stochastic processes.}
\usage{
simulate(object, nsim=1, seed=NULL, xinit, true.parameter, space.discretized = FALSE,
- increment.W = NULL, increment.L = NULL, methodfGn = "WoodChan",
+ increment.W = NULL, increment.L = NULL, hurst, methodfGn = "WoodChan",
sampling=sampling, subsampling=subsampling, ...)
}
\arguments{
@@ -20,6 +20,7 @@
package \code{stats}.}
\item{seed}{Not used yet. Included only to match the standard genenirc in
package \code{stats}.}
+ \item{hurst}{value of Hurst parameter for simulation of the fGn. Overrides the specified hurst slot.}
\item{methodfGn}{simulation methods for fractional Gaussian noise.}
\item{...}{passed to \code{\link{setSampling}} to create a sampling}
\item{sampling}{a \code{\link{yuima.sampling-class}} object.}
Modified: pkg/yuima/man/yuima.model-class.Rd
===================================================================
--- pkg/yuima/man/yuima.model-class.Rd 2013-10-10 14:41:32 UTC (rev 244)
+++ pkg/yuima/man/yuima.model-class.Rd 2013-10-10 14:41:57 UTC (rev 245)
@@ -19,7 +19,7 @@
coefficient (a matrix).}
\item{\code{hurst}:}{the Hurst parameter of the gaussian noise. If
\code{h=0.5}, the process is Wiener otherwise it is fractional Brownian
- motion with that precise value of the Hurst index.}
+ motion with that precise value of the Hurst index. Can be set to \code{NA} for further specification.}
\item{\code{jump.coeff}:}{a matrix of \code{expression}s for the jump
component.}
\item{\code{measure}:}{Levy measure for jump variables.}
More information about the Yuima-commits
mailing list