[Yuima-commits] r143 - in pkg/yuima: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jan 3 19:13:59 CET 2011


Author: hinohide
Date: 2011-01-03 19:13:58 +0100 (Mon, 03 Jan 2011)
New Revision: 143

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/R/llag.R
   pkg/yuima/man/llag.Rd
Log:
llag modified

Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2011-01-03 03:28:32 UTC (rev 142)
+++ pkg/yuima/DESCRIPTION	2011-01-03 18:13:58 UTC (rev 143)
@@ -1,8 +1,8 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project package (unstable version)
-Version: 0.1.181
-Date: 2011-01-03
+Version: 0.1.182
+Date: 2011-01-04
 Depends: methods, zoo, stats4, utils
 Suggests: cubature, mvtnorm
 Author: YUIMA Project Team.

Modified: pkg/yuima/R/llag.R
===================================================================
--- pkg/yuima/R/llag.R	2011-01-03 03:28:32 UTC (rev 142)
+++ pkg/yuima/R/llag.R	2011-01-03 18:13:58 UTC (rev 143)
@@ -1,9 +1,9 @@
 #lead-lag estimation
 
 #x:data plot:T or F
-setGeneric( "llag", function(x) standardGeneric("llag") )
-setMethod( "llag", "yuima", function(x) llag(x at data ))
-setMethod( "llag", "yuima.data", function(x) {
+setGeneric( "llag", function(x,verbose=FALSE) standardGeneric("llag") )
+setMethod( "llag", "yuima", function(x,verbose=FALSE) llag(x at data,verbose=verbose ))
+setMethod( "llag", "yuima.data", function(x,verbose=FALSE) {
 
   if(!is(x)=="yuima.data"){
      if(is(x)=="yuima"){
@@ -15,7 +15,8 @@
    }else{
      dat <- x
    }
-
+  
+     
 ##  dat <- get.zoo.data(x)
 ##  dat <- x at data
 
@@ -63,7 +64,10 @@
 
   covmat <- lagcce(opt)$covmat
   cormat <- lagcce(opt)$cormat
-  
-  return(list(lagcce=opt,covmat=covmat,cormat=cormat,mat=mat))
+  if(verbose==TRUE){
+    return(list(lagcce=opt,covmat=covmat,cormat=cormat,mat=mat))
+  }else{
+    return(list(lagcce=opt,covmat=covmat,cormat=cormat))
+  }
 })
 

Modified: pkg/yuima/man/llag.Rd
===================================================================
--- pkg/yuima/man/llag.Rd	2011-01-03 03:28:32 UTC (rev 142)
+++ pkg/yuima/man/llag.Rd	2011-01-03 18:13:58 UTC (rev 143)
@@ -5,10 +5,12 @@
 \description{TBA
 }
 \usage{
-llag(x)
+llag(x,verbose=FALSE)
 }
 \arguments{
-  \item{x}{an object of  \code{\link{yuima-class}} or \code{\link{yuima.data-class}}.}
+  \item{x}{an object of  \code{\link{yuima-class}} or
+	\code{\link{yuima.data-class}}.}
+  \item{verbose}{whether llag returns matrix or not.}
 }
 \details{
   TBA
@@ -56,7 +58,7 @@
   }
 
 # true value must be -theta=0.05
-ret <- llag(yuima)
+ret <- llag(yuima,verbose=TRUE)
 print(ret$opt)
 print(ret$covmat)
 print(ret$cormat)



More information about the Yuima-commits mailing list