[Uwgarp-commits] r37 - pkg/GARPFRM/vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 2 22:33:32 CET 2013


Author: rossbennett34
Date: 2013-12-02 22:33:31 +0100 (Mon, 02 Dec 2013)
New Revision: 37

Modified:
   pkg/GARPFRM/vignettes/RB.Rnw
   pkg/GARPFRM/vignettes/RB.pdf
Log:
Cleaning up some formatting in the vignette

Modified: pkg/GARPFRM/vignettes/RB.Rnw
===================================================================
--- pkg/GARPFRM/vignettes/RB.Rnw	2013-12-02 21:25:27 UTC (rev 36)
+++ pkg/GARPFRM/vignettes/RB.Rnw	2013-12-02 21:33:31 UTC (rev 37)
@@ -280,7 +280,7 @@
 @
 
 Scatterplot of CAT and market excess returns.
-<<>>=
+<<tidy=FALSE>>=
 plot(coredata(MKT.ret), coredata(CAT.ret), pch=19,
      col=rgb(0,0,100,50,maxColorValue=255),
      xlab="Market returns", ylab="CAT returns",
@@ -296,14 +296,7 @@
 <<>>=
 # The print method displays the call and the coefficients of the linear model
 model.fit
-@
 
-The results of the fitted model show that the equation for the linear model can be written as
-\begin{equation}
-\hat{CAT.ret_i} = 0.004892 + 0.602402 * MKT.ret_i
-\end{equation}
-
-<<>>=
 # The summary method displays additional information for the linear model
 model.summary <- summary(model.fit)
 model.summary
@@ -344,7 +337,7 @@
 
 Accessing elements of the models can be ued to compute measures of fit. Some measures of fit, such as the $R^2$, adjusted $R^2$, and standard error of regression are computed by the \verb"summary" function and just need to be extracted.
 
-\subsection{Measures of Fit}
+\subsubsection{Measures of Fit}
 Explained sum of squares (ESS)
 \begin{equation}
 ESS = \sum_{i=1}^n (\hat{Y}_i - \bar{Y})^2
@@ -369,13 +362,13 @@
 SSR <- sum(resid(model.fit)^2)
 @
 
-$R^2$
-The $R^2$ can be extracted from the \verb"model.summary" object.
+The regression $R^2$ is the fraction of the sample variance of $Y_i$ explained by $X_i$. The $R^2$ can be extracted from the \verb"model.summary" object.
 <<>>=
 r_squared <- model.summary$r.squared
+r_squared
 @
 
-$R^2$ can also be computed using the ESS, TSS, and SSR.
+The $R^2$ can also be computed using the ESS, TSS, and SSR.
 <<>>=
 ESS / TSS
 1 - SSR / TSS

Modified: pkg/GARPFRM/vignettes/RB.pdf
===================================================================
(Binary files differ)



More information about the Uwgarp-commits mailing list