1
$\begingroup$

I suppose this is a really stupid question, so please excuse me, but I can't get it.

I'm using Simple Linear Regression (Least Squares) to find a line, fitting some points. The points are actually statistical data for sales each month. So their x value is a number going up with once for each next month - 1, 2, 3, 4, ...

I give it the sales for 6 months - points like this:

(0, 5), (1, 4.5), (2, 8), (3, 8.2), (4, 8.5), (5, 9)

Then I run linear regression and get the predicted sales for next 3 months - I find y when x is 6, when x is 7 and when x is 8. So the next 3 generated predicted points are:

(6, 10.42), (7, 11.34), (8, 12.26)

Then I see the what the real data is, the real sales (because this months are already in the past, I'm just checking how accurate the prediction is).

Let's say that the real data is:

(6, 10.4), (7, 11), (8, 12)

So I calculate that R squares is around 0.8594.

My question is how can I find adjusted R squared?

I found this formula:

Adjusted $R^2=1-(1-R^2)\frac{n-1}{n-p-1}$,

where we have n observations and p parameters

So I suggest that n is 6 in my case, but what is p?

Thank you very much in advance and excuse once again my stupid question.

$\endgroup$

1 Answer 1

1
$\begingroup$

P is the number of regressors, without counting the constant term. If you are running simple linear regression with a single independent variable, then $P=1$.

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .