I have a linear regression like this :
lmGeneexp = lm(gene_expression ~ (pos1 + pos2 + pos3), data = donor_snp_sample)
summary(lmGeneexp)
when I run this code, this is the result:
Coefficients: (2 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.708 64.905 0.088 0.930
pos11 -25.853 436.678 -0.059 0.953
pos12 -48.653 443.310 -0.110 0.913
pos21 25.960 416.159 0.062 0.950
pos22 NA NA NA NA
pos31 24.269 117.284 0.207 0.836
pos32 NA NA NA NA
I can't understand why for each "pos#", there are 2 coefficients, for example for variable "pos1", there are "pos11" and "pos12" in the result. what is the problem with the code or my data?
thanks a lot
+++ This is an example of my data:
pos1 pos2 pos3 gene_expression
row1 0 0 1 7.4
row2 0 0 2 8.5
row3 0 0 1 6.3
row4 1 0 2 3.5
row5 2 0 0 2.1
row6 1 0 0 7.4
...