[R-sig-Epi] help
BXC (Bendix Carstensen)
bxc at steno.dk
Mon Nov 29 08:26:08 CET 2010
Dear Khan,
I am afraid that the help list is not an online-course.
The questions you ask are too general for this forum, they would be suitable for a teacher at an appropriate course in epidemidological methods.
For introduction to very basics of R in epidemiology you may benefit from the
"Workbook introduction to R", see, http://www.mhills.pwp.blueyonder.co.uk/Rwork_book.html
Best regards,
Bendix Carstensen
> -----Original Message-----
> From: Dr Khan Amir Maroof [mailto:khanamirmaroof at gmail.com]
> Sent: 29. november 2010 15:55
> To: BXC (Bendix Carstensen)
> Subject: Re: [R-sig-Epi] help
>
> Sir,
>
> I want to know how to write the command for this problem.
>
> I have entered the data in epidata and the variables are:
> age, hadwateryesterday, hadthinporridgeyesterday.
> age is a numeric variable containing numbers 0-23 months.
> the other two variables are factor variables: having 0 for
> no, 1 for yes and 8 for don't know
>
> how to write command if i want to get the following
> descriptive statistics:
> proportion of children less than 6 months for whom
> hadwateryesterday and hadthinporridgeyesterday is 0.
>
> I think in my last email, I was not able to explain my
> problem correctly.
> Also I am a novice in using R, so my questions are very basic
> as I have to master first how to write correct commands.
>
> Thanks for your help.
>
>
>
> On Mon, Nov 29, 2010 at 1:42 AM, BXC (Bendix Carstensen)
> <bxc at steno.dk> wrote:
>
>
> You make a three-way table to see how breastfeeding
> varies with the two others.
> You could also analyse by logistic regression.
>
> Best regards,
> Bendix
>
>
> > -----Original Message-----
> > From: Dr Khan Amir Maroof [mailto:khanamirmaroof at gmail.com]
> > Sent: 29. november 2010 03:57
> > To: BXC (Bendix Carstensen)
> > Subject: Re: [R-sig-Epi] help
> >
> > thanx for your reply.
> >
> > i m posting my original problem. i hv a variables: 'age' in
> > completed months frm 0 to 23; 'took water yesterday' as 1 for
> > yes, 2 for no and 8 for don't know; 'took thin porridge
> > yesterday' as 1 for yes, 2 for no and 8 for don't know. now i
> > hv to find out this: if took water yesterday or took thin
> > porridge yesterday by children less than 6 months of age,
> > then they are not exclusively breastfed, whereas if not taken
> > any of these yesterday then they are exclusively breastfed.
> >
> > kindly let me know how to do this in R or epicalc.
> >
> > thanking you.
> >
> >
> > On Sun, Nov 28, 2010 at 12:47 PM, BXC (Bendix Carstensen)
> > <bxc at steno.dk> wrote:
> >
> >
> > It sounds as if you are looking for something like
> >
> > newvar <- as.numeric(var1=="yes")
> >
> > or
> >
> > newvar <- as.numeric(var1==1)
> >
> > depending on whether var1 is numeric or character.
> >
> > Best regards,
> > Bendix Carstensen
> >
> >
> > > -----Original Message-----
> > > From: r-sig-epi-bounces at r-project.org
> > > [mailto:r-sig-epi-bounces at r-project.org] On
> Behalf Of Dr Khan
> > > Amir Maroof
> > > Sent: 27. november 2010 16:31
> > > To: r-sig-epi at stat.math.ethz.ch
> > > Subject: [R-sig-Epi] help
> > >
> > > Sir,
> > >
> > > Its wonderful to start using this software R.
> I am making
> > > full efforts to learn it on my own with the
> help of the free
> > > online manuals available. I am using epicalc
> package in R. I
> > > have a dataset where i want to apply
> conditions like... if
> > > var1 is yes or 1, assign 1 to it or else 0.
> Can you help me
> > > with this problem?
> > >
> > > Thanking you,
> > >
> > > --
> > > Dr. Khan Amir Maroof,
> > > Lecturer,
> > > Department of Community Medicine,
> > > University College of Medical Sciences & GTB
> Hospital, Delhi
> > >
> >
> > > [[alternative HTML version deleted]]
> > >
> > > _______________________________________________
> > > R-sig-Epi at r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-sig-epi
> > >
> >
> >
> >
> >
> > --
> > Dr. Khan Amir Maroof,
> > Lecturer,
> > Department of Community Medicine,
> > University College of Medical Sciences & GTB Hospital, Delhi
> > www.teachingcommunitymedicine.blogspot.com
> <http://www.teachingcommunitymedicine.blogspot.com/>
> >
> >
> >
>
>
>
>
> --
> Dr. Khan Amir Maroof,
> Lecturer,
> Department of Community Medicine,
> University College of Medical Sciences & GTB Hospital, Delhi
> www.teachingcommunitymedicine.blogspot.com
> <http://www.teachingcommunitymedicine.blogspot.com/>
>
>
>
More information about the R-sig-Epi
mailing list