Beginner on R - Needing help analysing data

Hi everyone!

I'm looking to see if I can get some help analysing data on R studio.
image
This is my dataset. I am looking to see whether an increase in "Neutrophil Cell Count" correlates with an increase in "Monocyte Cell Count". What sort of test should I do? I also need to plot these results, how should I do so?

What have you tried so far? what is your specific problem?, we are more inclined towards helping you with specific coding problems rather than doing your work for you.

Could you please turn this into a self-contained REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

Perhaps we should ask you which tests you have been taught, or were mentioned to you in your course, or course materials?
It might be better for us to advise you from amongst those choices than to do otherwise...

Thanks for the help!!
What do you think the best way to plot this data would be? I have made a mosaic plot but I'm not sure if there is a better way..

After doing a chi test on the data, the data is showing a p-value of 0.08, therefore not p,<0.05, although close, does this still mean it is insignificant? Does the p-value have meaning in this calculation?

mosaic sounds like a good way to visualise

Thank you, I'm currently trying to do the spearman calculation but its saying that x needs to be a numeric factor, how can thi be fixed?

again, thanks for the help :slight_smile:

I couldnt even begin to start with that reprex I am very much a beginner, general advice on how to use the spearman method to calculate corrolation would be much appreciated. I have also created this new mosaic plot, the darker line meaning this is the majority correct? with the standardised residuals.

unless you attach() a dataframe, you must reference the variables in it like
myframe$myvar1 etc.
if you attach(myframe)
then you can use myvar1 directly, but otherwise myframe$myvar1 or myframe[["myvar1"]] (which are equivalent)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.


This is what I have made so far, I just dont completely understand the next steps

for direct help with the specific of your data, this would be needed, otherewise i could only give you a general answer

I think I should use Pearsons? But still unsure..

Working through the book Statistics: An Introduction Using R
Book by Michael J Crawley. have done things such as chi test, pearsons R, t test p test, anova and ancova

Thank you :slight_smile:
https://support.minitab.com/en-us/minitab-express/1/help-and-how-to/modeling-statistics/regression/supporting-topics/basics/a-comparison-of-the-pearson-and-spearman-correlation-methods/
I think the two variables you want to compare are ordinal, and so the spearman 'flavour' of correlation test would be more appropriate