诸葛山下 发表于 2014-9-6 14:33 
Can you give me an example? Thank you !
OK. For example, the dependent variable is the rate of cure. Now we have 2 groups. One group feeds Placebo and the other feeds a new medicine. What we want to check is whether the new medicine can improve the rate of cure. Now the independent variable is the dummy. When you input the data in the R, you can use rep() to create the dummy. Furthermore, if you have 3 groups then you have to create 2 variables.