Why would you assert that the mean is the same as the intercept? For data 
clustered far from the y axis this seems clearly unlikely to be true.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnew...@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Lao Meng <laomen...@gmail.com> wrote:

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]]

_____________________________________________

R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to