[Yuima-commits] r254 - pkg/yuima/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Oct 11 15:43:42 CEST 2013
Author: iacus
Date: 2013-10-11 15:43:42 +0200 (Fri, 11 Oct 2013)
New Revision: 254
Modified:
pkg/yuima/man/mmfrac.Rd
Log:
up
Modified: pkg/yuima/man/mmfrac.Rd
===================================================================
--- pkg/yuima/man/mmfrac.Rd 2013-10-11 13:36:25 UTC (rev 253)
+++ pkg/yuima/man/mmfrac.Rd 2013-10-11 13:43:42 UTC (rev 254)
@@ -1,118 +1,34 @@
\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. ~~
+Estimates the drift of s fractional Ornstein-Uhlenbeck and, if necessary, also the Hurst and diffusion parameters.
}
\usage{
mmfrac(yuima, ...)
}
-%- maybe also 'usage' for other objects documented here.
\arguments{
- \item{yuima}{
-%% ~~Describe \code{yuima} here~~
+ \item{yuima}{a \code{yuima} object.
}
- \item{\dots}{
-%% ~~Describe \code{\dots} here~~
+ \item{\dots}{arguments passed to \code{\link{qgv}}.
}
}
\details{
-%% ~~ If necessary, more details than the description above ~~
+Estimates the drift of s fractional Ornstein-Uhlenbeck and, if necessary, also the Hurst and diffusion parameters.
}
-\value{
-%% ~Describe the value returned
-%% If it is a LIST, use
-%% \item{comp1 }{Description of 'comp1'}
-%% \item{comp2 }{Description of 'comp2'}
-%% ...
+\value{an object of class mmfrac
}
\references{
-%% ~put references to the literature/web site here ~
+Brouste, A., Iacus, S.M. (2013) Parameter estimation for the discretely observed fractional Ornstein-Uhlenbeck process and the Yuima R package, Computational Statistics, pp. 1129--1147.
}
-\author{
-%% ~~who you are~~
-}
-\note{
-%% ~~further notes~~
-}
-
-%% ~Make other sections like Warning with \section{Warning }{....} ~
-
+\author{The YUIMA Project Team}
\seealso{
-%% ~~objects to See Also as \code{\link{help}}, ~~~
+See also \code{\link{qgv}}.
}
\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)
- }
+#Example
}
-% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
-\keyword{ ~kwd1 }
-\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
+\keyword{ts}
More information about the Yuima-commits
mailing list