Hi all:
I have a question about lm on t-test.

data(sleep)

I wanna perform t-test to test the difference between the 2 groups:

I can use:
t.test(extra~group)

The t.test result shows that:t = -1.8608; mean1=0.75,mean2=2.33


But I still wanna use:
summary(lm(extra~group))

Intercept=0.75,which is mean1,just the same as t.test.
group2=1.58 means the difference of the 2 groups,so
mean2=1.58+0.75=2.33,just the same as t.test.
And some parameters of group2(t value,Pr) are the same as t.test,since
group2 is the difference of the 2 groups.

My question is:
How the "t value" of Intercept(group1 acturally) is calculated?


Thanks a lot.

My best

	[[alternative HTML version deleted]]

