[Gogarch-commits] r20 - in pkg: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Feb 7 15:02:31 CET 2009


Author: bpfaff
Date: 2009-02-07 15:02:30 +0100 (Sat, 07 Feb 2009)
New Revision: 20

Added:
   pkg/R/Goestmm-goest.R
   pkg/R/Goestmm-show.R
   pkg/man/Goestmm-class.Rd
Modified:
   pkg/DESCRIPTION
   pkg/NAMESPACE
   pkg/R/All-classes.R
   pkg/R/Orthom-class.R
   pkg/R/Umatch.R
   pkg/R/cora.R
   pkg/R/gogarch.R
   pkg/man/GoGARCH-class.Rd
   pkg/man/Goestml-class.Rd
   pkg/man/Goestnls-class.Rd
   pkg/man/goest-methods.Rd
   pkg/man/gogarch.Rd
Log:
Method of Moments method and class added.


Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/DESCRIPTION	2009-02-07 14:02:30 UTC (rev 20)
@@ -1,8 +1,8 @@
 Package: gogarch
-Version: 0.4-5
+Version: 0.4-8
 Type: Package
 Title: Generalized Orthogonal GARCH (GO-GARCH) models
-Date: 2009-02-05
+Date: 2009-02-06
 Author: Bernhard Pfaff
 Maintainer: Bernhard Pfaff <bernhard at pfaffikus.de>
 Depends: R (>= 2.7.0), methods, stats, fGarch

Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/NAMESPACE	2009-02-07 14:02:30 UTC (rev 20)
@@ -5,7 +5,7 @@
 importFrom(stats, coef, formula, logLik, predict, residuals, update)
 
 ## Classes       
-exportClasses(Goestml, Goestnls, GoGARCH, Goinit, Gopredict, Gosum, Orthom)
+exportClasses(Goestml, Goestmm, Goestnls, GoGARCH, Goinit, Gopredict, Gosum, Orthom)
 
 ## Methods
 exportMethods(angles, cvar, ccor, ccov, coef, converged, formula, goest, logLik, M, predict, print, show, summary, t, residuals, update)

Modified: pkg/R/All-classes.R
===================================================================
--- pkg/R/All-classes.R	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/R/All-classes.R	2009-02-07 14:02:30 UTC (rev 20)
@@ -1,4 +1,8 @@
 ##
+## Class definition of orthogonal matrices
+##
+setClass(Class = "Orthom", representation(M = "matrix"))
+##
 ## Class definition of initial GO-GARCH objects
 ##
 setClass(Class = "Goinit", representation(X = "matrix", V = "matrix", P = "matrix", Dsqr = "matrix", garchf = "formula", name = "character"))
@@ -11,10 +15,14 @@
 ##
 setClass(Class = "Goestml", representation(opt = "list"), contains = "GoGARCH")
 ##
-## Class definition of GO-GARCH objects, estimated by Maximum-Likelihood
+## Class definition of GO-GARCH objects, estimated by Non-linear Least-Squares
 ##
 setClass(Class = "Goestnls", representation(nls = "list"), contains = "GoGARCH")
 ##
+## Class definition of GO-GARCH objects, estimated by Methods of Moments
+##
+setClass(Class = "Goestmm", representation(weights = "numeric", Umatched = "list"), contains = "GoGARCH")
+##
 ## Class definition for summary objects from GoGARCH
 ##
 setClass(Class = "Gosum", representation(name = "character", method = "character", model = "formula", garchc = "list", Zinv = "matrix"))
@@ -22,9 +30,5 @@
 ## Class definition for predict objects from GoGARCH
 ##
 setClass(Class = "Gopredict", representation(Hf = "list", Xf = "matrix", CGARCHF = "list"))
-##
-## Class definition of orthogonal matrices
-##
-setClass(Class = "Orthom", representation(M = "matrix"))
 
 

Added: pkg/R/Goestmm-goest.R
===================================================================
--- pkg/R/Goestmm-goest.R	                        (rev 0)
+++ pkg/R/Goestmm-goest.R	2009-02-07 14:02:30 UTC (rev 20)
@@ -0,0 +1,58 @@
+setMethod(f = "goest", signature(object = "Goestmm"), definition = function(object, lag.max, garchlist, ...){
+  lag.max <- abs(as.integer(lag.max))
+  X <- object at X
+  m <- ncol(X)
+  n <- nrow(X)
+  P <- object at P
+  Id <- diag(m)
+  Dsqr <- object at Dsqr
+  Dsqri <- diag(1 / diag(Dsqr))
+  Sinv <- P %*% Dsqri %*% t(P)
+  S <- X %*% Sinv
+  if(lag.max < 1){
+    U <- Id
+    Umatched <- list(U)
+    weights <- 1
+  } else {
+    SSI <- array(dim = c(m, m, n))
+    for(i in 1:n){
+      SSI[, , i] <- S[i, ] %*% t(S[i, ]) - diag(m)
+    }
+    Phil <- lapply(1:lag.max, function(x) cora(SSI, lag = x))
+    svd <- lapply(Phil, function(x) svd(x))
+    evmin <- unlist(lapply(svd, function(x){
+      sel <- combn(1:m, 2)
+      diffs2 <- (x$d[sel[1, ]] - x$d[sel[2, ]])^2
+      min(diffs2)
+    }))
+    denom <- sum(evmin)
+    weights <- evmin / denom
+    Ul <- lapply(svd, function(x) x$u)
+    Ul[[1]] <- Umatch(Id, Ul[[1]])
+    Sm <- matrix(0, nrow = m, ncol = m)
+    for(i in 1:lag.max){
+      Ul[[i]] <- Umatch(Ul[[1]], Ul[[i]])
+      mp <- Id + Ul[[i]]
+      mpsvd <- svd(mp)
+      mpinv <- mpsvd$u %*% diag(1/mpsvd$d) %*% t(mpsvd$u)
+      mm <- Id - Ul[[i]]
+      mmprod <- weights[i] * mm %*% mpinv
+      Sm <- Sm + mmprod
+    }
+    Umatched <- Ul
+    mp <- Id + Sm
+    mpsvd <- svd(mp)
+    mpinv <- mpsvd$u %*% diag(1/mpsvd$d) %*% t(mpsvd$u)
+    mm <- Id - Sm
+    U <- mm %*% mpinv
+  }
+  Y <- S %*% U
+  Z <- P %*% Dsqr %*% t(P) %*% t(U)
+  fitted <- apply(Y, 2, function(x) do.call("garchFit", c(list(formula = object at garchf, data = quote(x)), garchlist)))
+  H <- matrix(unlist(lapply(fitted, function(x) x at h.t)), ncol = m, nrow = n)
+  Hdf <- data.frame(t(H))
+  Ht <- lapply(Hdf, function(x) Z %*% diag(x) %*% t(Z))
+  names(Ht) <- rownames(object at X)          
+  result <- new("Goestmm", weights = weights, Umatched = Umatched, estby = "Methods of Moments", U = U, Z = Z, Y = Y, H = Ht, models = fitted, X = object at X, P = object at P, Dsqr = object at Dsqr, V = object at V, garchf = object at garchf, name = object at name) 
+  return(result)  
+})

Added: pkg/R/Goestmm-show.R
===================================================================
--- pkg/R/Goestmm-show.R	                        (rev 0)
+++ pkg/R/Goestmm-show.R	2009-02-07 14:02:30 UTC (rev 20)
@@ -0,0 +1,3 @@
+setMethod(f = "show", signature(object = "Goestmm"), definition = function(object){
+  callNextMethod()
+})

Modified: pkg/R/Orthom-class.R
===================================================================
--- pkg/R/Orthom-class.R	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/R/Orthom-class.R	2009-02-07 14:02:30 UTC (rev 20)
@@ -3,17 +3,18 @@
 ##
 validOrthomObject <- function(object){
   m <- nrow(object at M)
-  if(all.equal(diff(dim(object at M)), 0, check.attributes = FALSE)){
+  Id <- diag(m)
+  if(diff(dim(object at M)) == 0){
     TRUE
   } else {
     print("\nObject is not a square matrix.\n")
   }
-  if(all.equal(det(object at M), 1, check.attributes = FALSE)){
+  if(isTRUE(all.equal(1, abs(det(object at M))))){
     TRUE
   } else {
-    print("\nDeterminant of object is not equal to 1.\n")
+    print("\nAbsolute value of Determinant of object is not equal to 1.\n")
   }
-  if(all.equal(crossprod(object at M), diag(m), check.attributes = FALSE)){
+  if(isTRUE(all.equal(Id, crossprod(object at M), check.attributes = FALSE))){
     TRUE
   } else {
     print("\nThe cross product of the object is not the Identity matrix.\n")

Modified: pkg/R/Umatch.R
===================================================================
--- pkg/R/Umatch.R	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/R/Umatch.R	2009-02-07 14:02:30 UTC (rev 20)
@@ -1,8 +1,12 @@
 Umatch <- function(from, to){
   cols <- ncol(from)
-  mat <- matrix(0, nrow = cols, ncol = cols) 
-  for(i in 1:cols){
-    inner <- colSums(to * as.vector(from[, i]))
+  mat <- matrix(0, nrow = cols, ncol = cols)
+  inner <- abs(colSums(from[, 1] * to))
+  maxcol <- which.max(inner)
+  mat[, 1] <- to[, maxcol]
+  to <- as.matrix(to[, -maxcol])
+  for(i in 2:cols){
+    inner <- abs(colSums(from[, i] * to))
     maxcol <- which.max(inner)
     mat[, i] <- to[, maxcol]
     to <- as.matrix(to[, -maxcol])

Modified: pkg/R/cora.R
===================================================================
--- pkg/R/cora.R	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/R/cora.R	2009-02-07 14:02:30 UTC (rev 20)
@@ -1,5 +1,5 @@
 cora <- function(SSI, lag = 1){
-  lags <- abs(as.integer(lags))
+  lag <- abs(as.integer(lag))
   dims <- dim(SSI)
   Gamma <- matrix(0, nrow = dims[1], ncol = dims[2])
   SSIp <- array(dim = dims)
@@ -11,12 +11,12 @@
   Gsvd <- svd(Gamma)
   Gsqrtinv <- Gsvd$u %*% diag(1/sqrt(Gsvd$d)) %*% t(Gsvd$u)
   idx <- 1:dims[3]
-  if(identical(lags, as.integer(0))){
+  if(identical(lag, as.integer(0))){
     idx1 <- idx
     idx2 <- idx
   } else {
-    idx1 <- idx[-c(1:lags)]
-    idx2 <- rev(rev(idx)[-c(1:lags)])
+    idx1 <- idx[-c(1:lag)]
+    idx2 <- rev(rev(idx)[-c(1:lag)])
   }
   nl <- length(idx1)
   Gamma <- matrix(0, nrow = dims[1], ncol = dims[2])

Modified: pkg/R/gogarch.R
===================================================================
--- pkg/R/gogarch.R	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/R/gogarch.R	2009-02-07 14:02:30 UTC (rev 20)
@@ -1,34 +1,19 @@
-gogarch <- function(data, formula, scale = FALSE, method = c("ml", "nls"), initial = NULL, garchlist = list(init.rec = "mci", delta = 2, skew = 1, shape = 4, cond.dist = "norm", include.mean = FALSE, include.delta = NULL, include.skew = NULL, include.shape = NULL, leverage = NULL, trace = FALSE, algorithm = "nlminb", hessian = "ropt", control = list(), title = NULL, description = NULL), ...){
+gogarch <- function(data, formula, scale = FALSE, method = c("mm", "ml", "nls"), lag.max = 1, initial = NULL, garchlist = list(init.rec = "mci", delta = 2, skew = 1, shape = 4, cond.dist = "norm", include.mean = FALSE, include.delta = NULL, include.skew = NULL, include.shape = NULL, leverage = NULL, trace = FALSE, algorithm = "nlminb", hessian = "ropt", control = list(), title = NULL, description = NULL), ...){
   method <- match.arg(method)
   Call <- match.call()
-  d <- ncol(data)
   gini <- goinit(X = data, garchf = formula, scale = scale)
   gomod <- new("GoGARCH", gini)
   if(method == "ml"){
-    if(is.null(initial)){
-      l <- d * (d - 1)/2
-      initial <- seq(3.0, 0.1, length.out = l)
-    } else {
-      l <- length(initial)
-      if (l != d * (d - 1)/2) {
-        stop(paste("\nLength of initial vector does not match implied dimension of orthogonal matrix.\n", "It should have length: ", d * (d - 1)/2, sep = ""))
-      }
-    }
     goestml <- new("Goestml", gomod)
     gogarch <- goest(object = goestml, initial = initial, garchlist = garchlist, ...)
   }
   if(method == "nls"){
-    if(is.null(initial)){
-      l <- d * (d + 1)/2
-      initial <- rep(0.1, l)
-    } else {
-      l <- length(initial)
-      if (l != d * (d + 1)/2) {
-        stop(paste("\nLength of initial vector does not match length of vech(B).\n", "It should have length: ", d * (d + 1)/2, sep = ""))
-      }
-    }
     goestnls <- new("Goestnls", gomod)
-    gogarch <- goest(goestnls, initial, garchlist, ...)
+    gogarch <- goest(object = goestnls, initial = initial, garchlist = garchlist, ...)
+  }
+  if(method == "mm"){
+    goestmm <- new("Goestmm", gomod)
+    gogarch <- goest(object = goestmm, lag.max = lag.max, garchlist = garchlist, ...)
   }  
   gogarch at CALL <- Call
   gogarch at name <- deparse(substitute(data))

Modified: pkg/man/GoGARCH-class.Rd
===================================================================
--- pkg/man/GoGARCH-class.Rd	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/man/GoGARCH-class.Rd	2009-02-07 14:02:30 UTC (rev 20)
@@ -31,7 +31,7 @@
 \section{Slots}{
 	 \describe{
     \item{\code{Z}:}{Object of class \code{"matrix"}: Transformation matrix.}
-    \item{\code{U}:}{Object of class \code{"matrix"}: Orthonormal matrix.}
+    \item{\code{U}:}{Object of class \code{"Orthom"}: Orthonormal matrix.}
     \item{\code{Y}:}{Object of class \code{"matrix"}: Extracted
 	 component matrix.}
     \item{\code{H}:}{Object of class \code{"list"}: List of conditional

Modified: pkg/man/Goestml-class.Rd
===================================================================
--- pkg/man/Goestml-class.Rd	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/man/Goestml-class.Rd	2009-02-07 14:02:30 UTC (rev 20)
@@ -18,6 +18,7 @@
 \alias{coef,Goestml-method}
 \alias{converged,Goestml-method}
 \alias{formula,Goestml-method}
+\alias{goest,Goestml-method}
 \alias{logLik,Goestml-method}
 \alias{predict,Goestml-method}
 \alias{residuals,Goestml-method}
@@ -41,7 +42,7 @@
     \item{\code{opt}:}{Object of class \code{"list"}: List returned by
 	 \code{nlminb}.} 
     \item{\code{Z}:}{Object of class \code{"matrix"}: Transformation matrix.}
-    \item{\code{U}:}{Object of class \code{"matrix"}: Orthonormal matrix.}
+    \item{\code{U}:}{Object of class \code{"matrix"}: Orthogonal matrix.}
     \item{\code{Y}:}{Object of class \code{"matrix"}: Extracted
 	 component matrix.}
     \item{\code{H}:}{Object of class \code{"list"}: List of conditional

Added: pkg/man/Goestmm-class.Rd
===================================================================
--- pkg/man/Goestmm-class.Rd	                        (rev 0)
+++ pkg/man/Goestmm-class.Rd	2009-02-07 14:02:30 UTC (rev 20)
@@ -0,0 +1,82 @@
+\name{Goestmm-class}
+
+\encoding{latin1}
+
+\docType{class}
+
+\alias{Goestmm-class}
+\alias{show,Goestmm-method}
+\alias{goest,Goestmm-method}
+
+\title{Class "Goestmm": Go-GARCH models estimated by Methods of Moments}
+
+\description{
+  This class contains the \code{GoGARCH} class and has the weights
+  vector and the matched orthogonal matrices \eqn{U} as additional
+  slots.
+}
+
+\section{Objects from the Class}{
+  Objects can be created by calls of the form \code{new("Goestmm", ...)},
+  or with the function \code{gogarch}. 
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{weights}:}{Object of class \code{"numeric"}: Weights for
+  aggregating the matched orthogonal matrices \eqn{U}.}
+    \item{\code{Umatched}:}{Object of class \code{"list"}: List of
+  matched orthogonal matrices \eqn{U}.}
+    \item{\code{Z}:}{Object of class \code{"matrix"}: Transformation matrix.}
+    \item{\code{U}:}{Object of class \code{"matrix"}: Orthogonal matrix.}
+    \item{\code{Y}:}{Object of class \code{"matrix"}: Extracted
+	 component matrix.}
+    \item{\code{H}:}{Object of class \code{"list"}: List of conditional
+	 variance/covariance matrices.}
+    \item{\code{models}:}{Object of class \code{"list"}: List of
+	 univariate GARCH model fits.}
+    \item{\code{estby}:}{Object of class \code{"character"}: Estimation method.}
+    \item{\code{X}:}{Object of class \code{"matrix"}: The data matrix.}
+    \item{\code{V}:}{Object of class \code{"matrix"}: Covariance matrix
+	 of \code{X}.}
+    \item{\code{P}:}{Object of class \code{"matrix"}: Left singular
+	 values of Var/Cov matrix of \code{X}.}
+    \item{\code{Dsqr}:}{Object of class \code{"matrix"}: Square roots of
+      eigenvalues on diagonal, else zero.}
+    \item{\code{garchf}:}{Object of class \code{"formula"}: Garch
+	 formula used for uncorrelated component GARCH models.}
+    \item{\code{name}:}{Object of class \code{"character"}: The name of
+      the original data object.}
+  }
+}
+
+\section{Extends}{
+Class \code{"\linkS4class{GoGARCH}"}, directly.
+Class \code{"\linkS4class{Goinit}"}, by class "GoGARCH", distance 2.
+}
+
+\section{Methods}{
+  \describe{
+    \item{goest}{Methods of moments estimation of Go-GARCH models.}
+    \item{show}{show-method for objects of class \code{Goestnls}.}
+  }
+}
+
+\references{
+  Boswijk, H. Peter and van der Weide, Roy (2009), Method of Moments
+  Estimation of GO-GARCH Models, \emph{Working Paper}, University of
+  Amsterdam, Tinbergen Institute and World Bank.
+}
+
+\author{
+  Bernhard Pfaff
+}
+
+\seealso{
+  \code{\linkS4class{GoGARCH}}, \code{\linkS4class{Goinit}},
+  \code{\linkS4class{Gosum}}, \code{\linkS4class{Gopredict}},
+  \code{\link{goest-methods}}, \code{\link{gogarch}},
+  \code{\link{Umatch}}
+}
+
+\keyword{classes}

Modified: pkg/man/Goestnls-class.Rd
===================================================================
--- pkg/man/Goestnls-class.Rd	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/man/Goestnls-class.Rd	2009-02-07 14:02:30 UTC (rev 20)
@@ -18,7 +18,7 @@
 \alias{summary,Goestnls-method}
 \alias{update,Goestnls-method}
 
-\title{Class "Goestnls": GO-GARCH models estimated by non-linear Least-Squares}
+\title{Class "Goestnls": GO-GARCH models estimated by Non-linear Least-Squares}
 
 \description{
   This class contains the \code{GoGARCH} class and has the
@@ -26,16 +26,16 @@
 }
 
 \section{Objects from the Class}{
-Objects can be created by calls of the form \code{new("Goestnls", ...)},
-or with the function \code{gogarch}. 
+  Objects can be created by calls of the form \code{new("Goestnls", ...)}, 
+  or with the function \code{gogarch}. 
 }
 
 \section{Slots}{
-	 \describe{
+  \describe{
     \item{\code{nls}:}{Object of class \code{"list"}: List returned by
 	 \code{nlminb}.}
     \item{\code{Z}:}{Object of class \code{"matrix"}: Transformation matrix.}
-    \item{\code{U}:}{Object of class \code{"matrix"}: Orthonormal matrix.}
+    \item{\code{U}:}{Object of class \code{"matrix"}: Orthogonal matrix.}
     \item{\code{Y}:}{Object of class \code{"matrix"}: Extracted
 	 component matrix.}
     \item{\code{H}:}{Object of class \code{"list"}: List of conditional
@@ -56,6 +56,7 @@
       the original data object.}
   }
 }
+
 \section{Extends}{
 Class \code{"\linkS4class{GoGARCH}"}, directly.
 Class \code{"\linkS4class{Goinit}"}, by class "GoGARCH", distance 2.
@@ -88,7 +89,7 @@
 \seealso{
   \code{\linkS4class{GoGARCH}}, \code{\linkS4class{Goinit}},
   \code{\linkS4class{Gosum}}, \code{\linkS4class{Gopredict}},
-  \code{\link{goest-methods}}
+  \code{\link{goest-methods}}, \code{\link{gogarch}}
 }
 
 

Modified: pkg/man/goest-methods.Rd
===================================================================
--- pkg/man/goest-methods.Rd	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/man/goest-methods.Rd	2009-02-07 14:02:30 UTC (rev 20)
@@ -6,8 +6,6 @@
 
 \alias{goest-methods}
 
-\alias{goest,Goestml-method}
-
 \alias{goest}
 
 \title{Methods for Function goest}
@@ -19,15 +17,15 @@
 
 \section{Methods}{
   \describe{
+    \item{goest}{\code{signature(object = "Goestmm")}}
     \item{goest}{\code{signature(object = "Goestml")}}
     \item{goest}{\code{signature(object = "Goestnls")}}
   }
 }
 
 \details{
-  The starting values for the Euler angles are provided in the argument
-  \code{initial} and the list \code{garchlist} contains the elements
-  that are passed \code{garchFit}. 
+  The declared estimation methods are called from function
+  \code{gogarch}.  
 }
 
 \author{
@@ -35,7 +33,9 @@
 }
 
 \seealso{
-  \code{\link[fGarch]{garchFit}}, \code{\linkS4class{Goestml}}
+  \code{\link[fGarch]{garchFit}}, \code{\linkS4class{Goestml}},
+  \code{\linkS4class{Goestnls}}, \code{\linkS4class{Goestmm}},
+  \code{\link{gogarch}}
 }
 
 \keyword{methods}

Modified: pkg/man/gogarch.Rd
===================================================================
--- pkg/man/gogarch.Rd	2009-02-05 20:20:09 UTC (rev 19)
+++ pkg/man/gogarch.Rd	2009-02-07 14:02:30 UTC (rev 20)
@@ -13,12 +13,12 @@
   models. 
 }
 \usage{
-gogarch(data, formula, scale = FALSE, method = c("ml", "nls"), initial = NULL,
-        garchlist = list(init.rec = "mci", delta = 2, skew = 1, shape =
-        4, cond.dist = "norm", include.mean = FALSE, include.delta = NULL, 
-        include.skew = NULL, include.shape = NULL, leverage = NULL, trace =
-        FALSE, algorithm = "nlminb", hessian = "ropt", control = list(), title
-        = NULL, description = NULL), ...) 
+gogarch(data, formula, scale = FALSE, method = c("mm", "ml", "nls"),
+  lag.max = 1, initial = NULL, garchlist = list(init.rec = "mci", delta
+  = 2, skew = 1, shape = 4, cond.dist = "norm", include.mean = FALSE,
+  include.delta = NULL, include.skew = NULL, include.shape = NULL,
+  leverage = NULL, trace = FALSE, algorithm = "nlminb", hessian =
+  "ropt", control = list(), title = NULL, description = NULL), ...) 
 }
 
 \arguments{
@@ -26,9 +26,15 @@
   \item{formula}{Formula: valid formula for univariate GARCH models.}
   \item{scale}{Logical, if \code{TRUE} the data is scaled. The default
   is \code{scale = FALSE}.}
-  \item{method}{Character: by Maximum-Likelihood \code{method = "ml"} or by non-linear
-  Least-Squares \code{method = "nls"}.}
-  \item{initial}{Numeric: starting values for Euler angles (see Details).}
+  \item{method}{Character: by Methods of Moments \code{method = "mm"}
+  (the default) or by Maximum-Likelihood \code{method = "ml"} or by
+  non-linear Least-Squares \code{method = "nls"}.}
+  \item{initial}{Numeric: starting values for optimization (used if
+  \code{method = "ml"} or \code{method = "nls"} has been chosen (see
+  Details).}
+  \item{lag.max}{Integer: The number of used lags for computing the
+    matched orthogonal matrices \eqn{U} (used if \code{method = "mm"}
+    has been chosen).}
   \item{garchlist}{List: Elements are passed to \code{garchFit}.}
   \item{\dots}{Ellipsis argument: is passed to \code{nlminb}.}
 }
@@ -36,20 +42,32 @@
 \details{
 If the argument \code{initial} is left \code{NULL}, the starting values
 are computed according \code{seq(3.0, 0.1, length.out = l)}, whereby
-\code{l} is the length of \code{initial}. This length must be equal to
-\eqn{m * (m - 1)/2}, whereby \eqn{m} is the number of columns of
-\code{data}.  
+\code{l} is the length of \code{initial} for \code{method = "ml"} and
+are set to \code{rep(0.1, d}, whereby \code{} for \code{method =
+  "nls"}. This length must be equal to \eqn{m * (m - 1)/2} for
+estimation by Maximum-Likelihood and \eqn{m * (m + 1)/2} for estimation
+by Non-linear Least-Squares, whereby \eqn{m} is the number of columns of
+\code{data}.   
 }
 
 \value{
-  An object of class \code{Goestml} is returned which extends the
-  \code{GoGARCH} class.
+  Dependent on the chosen estimation method either an object of class
+  \code{Goestmm} or \code{Goestml} or \code{Goestnls} is returned. All of
+  these classes extend the \code{GoGARCH} class.
 }
 
 \references{
   Van der Weide, Roy (2002), GO-GARCH: A Multivariate Generalized
   Orthogonal GARCH Model, \emph{Journal of Applied Econometrics},
   \bold{17(5)}, 549 -- 564.
+  
+  Boswijk, H. Peter and van der Weide, Roy (2006), Wake me up before
+  you GO-GARCH, \emph{Tinbergen Institute Discussion Paper}, \bold{TI
+  2006-079/4}, University of Amsterdam and Tinbergen Institute. 
+
+  Boswijk, H. Peter and van der Weide, Roy (2009), Method of Moments
+  Estimation of GO-GARCH Models, \emph{Working Paper}, University of
+  Amsterdam, Tinbergen Institute and World Bank.
 }
 
 \author{



More information about the Gogarch-commits mailing list