0

I'm doing a market model calculation with OLS and I'm using R. I have a sample date with variable Rm and Ri. Its a market model off asset returns as

$$ R_i = \alpha + \beta R_m $$

I have fitted a linear model, and now I have to run a Market Adjusted return model for $\beta = 1$, using t test statistics with hypothesis as H0: $\beta$ =1 ; H1: $\beta$ <>1

Please help how to perform a test that $\beta$ =1

Robert Long
  • 53,316
  • 10
  • 84
  • 148
H G
  • 1
  • 1

1 Answers1

0

The t-test is implemented in R. For a dataset "x" with columns "y" (continuous) and "x" (binary categorical):

t.test(y~x, data, alternative = "two-sided", var.equal = TRUE)

You can also display the results of linear models:

fit <- lm(y~x, data)
summary(fit)

If the regression model is appropriate (e.g., "x" is coded as integer values), it will give similar results as the t-test for β1.

Tom Kelly
  • 208
  • 1
  • 9
  • 1
    This is not quite correct. The default in R is to do an unequal-variance t-test (Welch year), while the lm linear model will assume equal variances. – Dave Aug 27 '20 at 00:43
  • I agree with Dave. Set `var.equal = TRUE`. Also, I would suggest `alternative = “two.sided”` (default) as I don’t think the OP is particularly interested in one side. – Thomas Bilach Aug 27 '20 at 01:08
  • The test is of coefficient = 1 not 0 – Glen_b Aug 27 '20 at 01:40