1507 search results for "regression"

The number 1 novice quant mistake

January 12, 2011
By
The number 1 novice quant mistake

It is ever so easy to make blunders when doing quantitative finance.  Very popular with novices is to analyze prices rather than returns. Regression on the prices When you want returns, you should understand log returns versus simple returns. Here we will be randomly generating our “returns” (with R) and we will act as if … Continue reading...

Read more »

sab-R-metrics: Subsetting, Conditional Statements, ‘tapply()’, and VERY simple ‘for loops’

January 11, 2011
By

In my last sab-R-metrics post, I went over some basics of calling data and creating vectors or new data from those. Here, I want to extend that to full subsets of data and go on to use some of the basic functions in R so that we can begin plotting in the next tutorial.Before I begin, I...

Read more »

sab-R-metrics: Subsetting, Conditional Statements, ‘tapply()’, and VERY simple ‘for loops’

January 11, 2011
By

In my last sab-R-metrics post, I went over some basics of calling data and creating vectors or new data from those. Here, I want to extend that to full subsets of data and go on to use some of the basic functions in R so that we can begin plotting in the next tutorial.Before I begin, I...

Read more »

R function for extracting F-test P-value from linear model object

January 10, 2011
By

I thought it would be trivial to extract the p-value on the F-test of a linear regression model (testing the null hypothesis R²=0). If I fit the linear model: fit<-lm(y~x1+x2), I can't seem to find it in names(fit) or summary(fit). But summary(fit)$fstatistic does give you the F statistic, and both degrees of freedom, so I wrote this function to...

Read more »

Using R for Introductory Statistics, Chapter 4, Model Formulae

January 10, 2011
By
Using R for Introductory Statistics, Chapter 4, Model Formulae

Several R functions take model formulae as parameters. Model formulae are symbolic expressions. They define a relationship between variables rather than an arithmetic expression to be evaluated immediately. Model formulae are defined with the tilde ope...

Read more »

Using R for Introductory Statistics, Chapter 4, Model Formulae

January 10, 2011
By
Using R for Introductory Statistics, Chapter 4, Model Formulae

Several R functions take model formulae as parameters. Model formulae are symbolic expressions. They define a relationship between variables rather than an arithmetic expression to be evaluated immediately. Model formulae are defined with the tilde ope...

Read more »

sab-R-metrics: Introduction to R

January 5, 2011
By
sab-R-metrics: Introduction to R

In a recent post, I briefly mentioned that I may turn a majority of the focus of this blog to teaching R commands for use with sabermetric analysis. Only a few days later, Ricky Zanker began a new column at The Hardball Times doing just that. But that's okay. Hopefully both his and mine...

Read more »

sab-R-metrics: Introduction to R

January 5, 2011
By
sab-R-metrics: Introduction to R

In a recent post, I briefly mentioned that I may turn a majority of the focus of this blog to teaching R commands for use with sabermetric analysis. Only a few days later, Ricky Zanker began a new column at The Hardball Times doing just that. But that's okay. Hopefully both his and mine...

Read more »

Review: Statistical Analysis with R: Beginner’s Guide by John M. Quick

January 1, 2011
By
Review: Statistical Analysis with R: Beginner’s Guide by John M. Quick

Summary: If you can get past the strange underlying story, then this gives a good introduction to R to someone with no programming experience. However, if you have any experience with other programming languages then another book is likely to be more suitable. Reference: Quick, J. M., Statistical Analysis in R: Beginners Guide, Packt Publishing,

Read more »

The R Journal, Vol.2 Issue 2 is out

December 31, 2010
By

The second issue of the second volume of The R Journal is now available . Download complete issue Refereed articles may be downloaded individually using the links below. Table of Contents Editorial 3 Contributed Research Articles Solving Differential Equations in R Karline Soetaert, Thomas Petzoldt and R. Woodrow Setzer 5 Source

Read more »