简体   繁体   中英

Multiple linear regression model

Can anyone please help me to understand the difference between using the asterisk and the plus signs in multiple linear regression model? If I want to fit this model

model<-lm(continuous variable ~ Covariate SEX+ Covariate RACE+ Factor gene* Factor SNP, 
    data= mydata)

is using the plus sign and the asterisk at the same time correct? I'm interested at looking the impact of factor gene and factor SNP on the continuous variable and I'm controlling for sex and race as co-variates in this study.

Also, I have another question please, if I'm fitting nearly over 100 model should I check for model assumption for each model that I fitted?

* is for crossing, (ie, y~a*b is equivalent to y~a+b+a:b )

continuous variable ~ Covariate SEX+ Covariate RACE+ Factor gene* Factor SNP

is, therefore, equivalent to

continuous variable ~ Covariate SEX+ Covariate RACE+ Factor gene + Factor SNP + Factor gene:Factor SNP

What you're doing is totally fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM