Hi All, I have cancer and WT controls samples from two different groups for size comparison. I would like to do some statistics to calculate p-value and perhaps get some plots. I am not very familiar with statistical analysis and was pondering if someone could teach me how to analyze this type of data. Thanks for your time. my data:
df <- structure(list(Group = c(1L, 1L, 1L, 2L, 2L, 2L, 2L), cancer = c(0.7,
0.7, 0.6, 0.65, 1, 0.75, 0.3), WTcontrol = c(1.1, 0.8, 0.7, 1.4,
1, 1, 1.05)), .Names = c("Group", "cancer", "WTcontrol"
), class = "data.frame", row.names = c(NA, -7L))
Actually, Group 1 and Group 2 are the experiments performed at two time points. The measurement is the diameter of the lesions. Yes, the samples are paired.
So since your samples are paired, I assume you want to know if Group2 is any different from Group1 when comparing the cancer sample with the WT sample. I have no idea if that makes sense experimentally (which is why I suggest you come up with a clear answer to what is it that you want to analyze? What are you trying to quantify?), but you could compute a ratio of lesion between matched samples, and do a linear model to see if the ratio is affected by the groups.
If you look under coefficients for "Group2", you'll see an "estimate" (effect size of Group2 versus Group1), a t-value and a p-value. It seems like the difference is not significant (p=0.44168), when analyzed this way at least.
You should read more on linear regression in R.
Since you asked about visualization, you can plot your raw data quickly with this code:
Visually it doesn't look like there's any correlation between Cancer and WT (i.e. control always more or less the same at time point 2 except for one outlier while cancer varies at lot. Group 1 seems a bit more consistent between the two pairs but with only 3 data points it's hard to say much about it.)