Thanks a lot,
I understand what you say but I'm having problems - maybe with the syntax or
the specific command.
You are right - I have a dataframe to store the data and want to automate
the analysis.
i.e. I want do a chisq.test with to know if alcohol intake (Y/N) differs
between sexes, then if
Thanks David,
I did notice that and I got his code to work using wilcox.test for the
continuous variables.
The problem is that when I tried to alter the code to do chisq.test on my
categorical variables there is something wrong with the syntax and I don't
know what.
Derek
--
View this message i
Your code may be untested but it works - also helping me slowly to start
understanding how to write functions. Thank you.
However I still have difficulty. I also have some categorical variables to
analyse by age & hiv status - i.e. my dataset expands to (for example);
id sex hiv age
I still need to do some repetitive statistical analysis on some outcomes
from a dataset.
Take the following as an example;
id sex hiv age famsize bmi resprate
1 M Pos 23 2 16 15
2 F Neg 24 5 18
I am fairly new to R and have a (for me) slightly complicated set of data to
analyse. It contains several continuous and categorical variables for a
group of individuals – e.g;
ID Sex Age Familysize Phone Education
1 M 23 3 Yes Primary
This is probably very simple but I'm new to R so apologies for being stupid.
I have some data with No coded as 0 and yes coded as 1.
e.g.
id sex alcohol smoker
1 M 01
2 F 10
3 M 00
I realise I can covert the numerical variable back to a factor by
f
6 matches
Mail list logo