[Uwgarp-commits] r48 - in pkg/GARPFRM: . R man sandbox
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Jan 23 01:14:53 CET 2014
Author: rossbennett34
Date: 2014-01-23 01:14:52 +0100 (Thu, 23 Jan 2014)
New Revision: 48
Added:
pkg/GARPFRM/man/plot.capm_mv.Rd
pkg/GARPFRM/man/plot.capm_uv.Rd
Modified:
pkg/GARPFRM/NAMESPACE
pkg/GARPFRM/R/capm.R
pkg/GARPFRM/sandbox/test_capm_rb.R
Log:
clean up namespace and minor changes to capm
Modified: pkg/GARPFRM/NAMESPACE
===================================================================
--- pkg/GARPFRM/NAMESPACE 2014-01-20 18:43:08 UTC (rev 47)
+++ pkg/GARPFRM/NAMESPACE 2014-01-23 00:14:52 UTC (rev 48)
@@ -1,11 +1,12 @@
-export(CAPM)
-export(getAlphas)
-export(getBetas)
-export(getStatistics)
-export(plot.capm_uv)
S3method(getAlphas,capm_mv)
S3method(getAlphas,capm_uv)
S3method(getBetas,capm_mv)
S3method(getBetas,capm_uv)
S3method(getStatistics,capm_mv)
S3method(getStatistics,capm_uv)
+export(CAPM)
+export(getAlphas)
+export(getBetas)
+export(getStatistics)
+export(plot.capm_mv)
+export(plot.capm_uv)
Modified: pkg/GARPFRM/R/capm.R
===================================================================
--- pkg/GARPFRM/R/capm.R 2014-01-20 18:43:08 UTC (rev 47)
+++ pkg/GARPFRM/R/capm.R 2014-01-23 00:14:52 UTC (rev 48)
@@ -137,7 +137,8 @@
return(tmp_sm)
}
-#' @export for univariate plot
+# you can't have anything after the @export tag
+#' @export
plot.capm_uv <- function(object){
xlab <- colnames(object$x_data)
ylab <- colnames(object$y_data)
@@ -153,7 +154,7 @@
}
-#' @export for SML line
+#' @export
plot.capm_mv <- function(object){
}
\ No newline at end of file
Added: pkg/GARPFRM/man/plot.capm_mv.Rd
===================================================================
--- pkg/GARPFRM/man/plot.capm_mv.Rd (rev 0)
+++ pkg/GARPFRM/man/plot.capm_mv.Rd 2014-01-23 00:14:52 UTC (rev 48)
@@ -0,0 +1,10 @@
+\name{plot.capm_mv}
+\alias{plot.capm_mv}
+\title{#}
+\usage{
+ plot.capm_mv(object)
+}
+\description{
+ #
+}
+
Added: pkg/GARPFRM/man/plot.capm_uv.Rd
===================================================================
--- pkg/GARPFRM/man/plot.capm_uv.Rd (rev 0)
+++ pkg/GARPFRM/man/plot.capm_uv.Rd 2014-01-23 00:14:52 UTC (rev 48)
@@ -0,0 +1,10 @@
+\name{plot.capm_uv}
+\alias{plot.capm_uv}
+\title{#}
+\usage{
+ plot.capm_uv(object)
+}
+\description{
+ #
+}
+
Modified: pkg/GARPFRM/sandbox/test_capm_rb.R
===================================================================
--- pkg/GARPFRM/sandbox/test_capm_rb.R 2014-01-20 18:43:08 UTC (rev 47)
+++ pkg/GARPFRM/sandbox/test_capm_rb.R 2014-01-23 00:14:52 UTC (rev 48)
@@ -34,3 +34,17 @@
getAlphas(tmp)
getBetas(tmp)
getStatistics(tmp)
+
+# multivariate CAPM
+R <- largecap.ts[, c("CAT", "DD")] - cbind(Rf, Rf)
+# Use the MKT object that was created earlier
+
+
+mv <- CAPM(R, MKT)
+mv
+coef(mv)
+mv.s <- summary(mv)
+mv.s
+
+coef(mv.s)
+
More information about the Uwgarp-commits
mailing list