On Jun 28, 2011, at 12:57 AM, Lao Meng wrote:

Thanks David for your reply.
You said "a single slope and intercept are estimated for each variable".Actually I can only get one intercept no matter how many

Sorry. You are right. You get individual slopes (and differences for factors) reference to a single intercept (unless you use different formula specification)


variables exist,but a slope for each variable.

Since the regression is done via:lm(CD4 ~ time + gender + income)
It seems that the explanatory variable(time) and the two covariants(gender,income) are treated in the same way,but I think explanatory variable and covariant should be treated differently

I do not understand what you are saying when you use the word 'differently' and increasing the number of times you say it is not improving communication.

although I don't know how to do it.
Also,they are not both numeric,if gender are F(Female) and M(Male),and income are L(Low),M(median),H(High).

Yes. discrete, unordered factors can have associated estimated effects, which will be differences from the intercept level. The intercept in you case would probably be Female/High, since the default ordering of factor levels is alphabetic. How are these multiple question arising? Are you in the middle of an introductory regression class?

--
David



2011/6/28 David Winsemius <dwinsem...@comcast.net>

On Jun 27, 2011, at 10:02 PM, Lao Meng wrote:

Hi all,I have some questions about the covariants of regression.

My target: To explore the trend of CD4 level through a period of time.

Response variable: CD4 count
Explanatory variable:time

Also, the demology information is available,such as gender,occupation,income
level...

Q1,Are these variables of demology information called covariant?
Q2,How can I correct the impact of "covariant" so that I can get the
"corrected result" of CD4's change through the time period?
Q3,How to treat the covariants in regression?I've looked up to many papers
of R on regression,which treat the covariant in the same

way as the Explanatory variable,like following:
lm(CD4 ~ time + gender + income)

Yes that seems pretty standard practice. It does, of course, force the relationships to a) be linear and b) means that a single slope and intercept are estimated for each variable, neither of a} or b} assumptions may be true.


From above expression of regression,it's obvious that the response variables
and covariants are treated the same way,

In what sense are you making that claim? True they are both numeric, but what else are you saying?

--
David

but acturally

they are totally different.



Thanks for your help.

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.

David Winsemius, MD
West Hartford, CT



David Winsemius, MD
West Hartford, CT

______________________________________________
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