I have data on age, gender and weights of children. For example:
Males Females age mean_wt se mean_wt se 1 4 0.2 5.3 0.2 2 5 0.3 6.2 0.3 3 6 0.4 7.1 0.2 4 7 0.5 8.2 0.5 5 8 0.1 9.1 0.6
I can apply t-test to determine if weights of males and females are different from each other. But if I plot 2 curves (one each for males and females) of age vs weight, how can I determine if the two curves are significantly different from each other?
How can I determine if above two curves are significantly different from each other? Thanks for your help.
Following is the output of regression in R:
summary(lm(y~age+gender+age*gender, data=mydata) Residuals: Min 1Q Median 3Q Max -46.189 -7.294 -0.189 7.560 62.560 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 92.68525 0.72402 128.016 < 2e-16 age 1.56090 0.06661 23.432 < 2e-16 genderM 2.83605 0.95037 2.984 0.00285 age:genderM -0.35239 0.08717 -4.043 5.34e-05 Residual standard error: 10.93 on 8113 degrees of freedom (55 observations deleted due to missingness) Multiple R-squared: 0.1118, Adjusted R-squared: 0.1114 F-statistic: 340.3 on 3 and 8113 DF, p-value: < 2.2e-16
I believe it means that there is significant interaction between age and gender and hence the curves for males and females for y vs age are significantly different. Is this right? Is this the best method or is there any other method? Also adjusted R-squared is only 0.11. Does this mean that 89% of variability is not being explained by age and gender?
I see that centering is highly recommended: http://www.ncbi.nlm.nih.gov/pubmed/15297898
Will centering affect P values? Should I center age? Should I convert gender into numeric values or should I let it be 'M' and 'F' and let R software manage it. If I convert it into numbers, should I convert to 0/1 or to 1/2? I thought all binar factors should be converted to 0/1 since that will show the effect more clearly but the article recommends 1/2.