1
$\begingroup$

I have a large data set in R which I am currently analysing. I'm trying to plot confounding variables and have one which considers the patients household equipment (2=none, 1= stove, 3= charcoal).

How would I tell R to make a graph which considers each of these categories, so I want to correlate malaria ("Malaria...giemsa") against each of the household equipment.

I basically want to see if there are higher counts for malaria if the patient has no household equipment, than if they had a stove/ charcoal etc.

Any suggestions on how to code this into R?

$\endgroup$

closed as off-topic by Peter Flom Jan 10 at 12:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – Peter Flom
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ If you have a question about what would be a suitable graphical display that should be on topic. $\endgroup$ – Glen_b Jan 10 at 12:02
  • $\begingroup$ Your use of the term 'correlate' is confusing with these type of variables. What type of correlation did you think of? What type of variable is Malaria? Do you basically have only 8 values (counts of yes/no malaria for 4 possibilities of household equipment)? Then use a table instead of a graph. $\endgroup$ – Martijn Weterings Jan 10 at 12:31
  • $\begingroup$ You do this by creating a factor variable. Look this up and you will find plenty of web pages explaining how to create and use factors. $\endgroup$ – Ben Jan 10 at 13:45

Browse other questions tagged or ask your own question.