Some formulas of linear regression

14 sec read

y: dependent variable
X: independent variable
r: residual

$$y=X\beta+r$$
$$\beta=inv(X’*X)*X’*y$$
$$\sigma^2=r’*r/df$$
$$df=N-rank(X)$$
$$\sigma_\beta^2=\sigma^2inv(X’X)$$
$$T_\beta=\beta/\sigma_\beta$$
$$contrast variance = c’*\sigma_\beta^2*c$$
$$T_{contrast}=c’\beta/\sqrt{contrast variance}$$
$$r=\beta\frac{std(x)}{std(y)}$$
$$\beta=r\frac{std(y)}{std(x)}$$
$$var(y) = \beta^2var(x)+ResSS/(n)$$


Receive email notification via email
Don't want to miss new papers in your field? Check out Stork we developed:

nirs2img, create an image file from NIRS data

I was asked where to get nirs2img script. Here it is. The download link is at the bottom of this article. nirs2img is to...
Xu Cui
51 sec read

mergefile.m – a MatLab script to merge CSV files

My wife asked me to write a script to merge some csv files she has. Usually this can be accomplished by a simple command in...
Xu Cui
35 sec read

xjview 9.6 released

In this version, we modified the templates for 3-D render view and use a high-resolution template. It also includes a few scalp view. You...
Xu Cui
31 sec read

Leave a Reply

Your email address will not be published. Required fields are marked *