s-news
[Top] [All Lists]

Re: categorising weight

To: bhavin toprani <b_toprani@hotmail.com>
Subject: Re: categorising weight
From: Frank E Harrell Jr <f.harrell@vanderbilt.edu>
Date: Mon, 07 Jan 2008 17:01:07 -0600
Cc: "s-news@lists.biostat.wustl.edu" <s-news@lists.biostat.wustl.edu>
In-reply-to: <BAY114-W31E01390C6E24E865AC1C8D4F0@phx.gbl>
References: <BAY114-W31E01390C6E24E865AC1C8D4F0@phx.gbl>
User-agent: Thunderbird 2.0.0.6 (X11/20071022)
bhavin toprani wrote:
  Dear all,
I have data of 797 pregnant women and the dataframe is anaemia.
It has 6 variables: anaemia is the response variable of interest is binary.
                         wt is continuous
                         ceb is categorical
                         educ is categorical
                         region is categorical
                         age is categorical
I want to use log linear models to investigate the association structure of the potential bio-demographic explanatory variables after categorising weight.
I want to categorise wt as <= 50, >50 AND <= 60, AND > 60.

This will result in a very poor analysis. See http://biostat.mc.vanderbilt.edu/CatContinuous

The first reference there shows how the resulting effects are almost impossible to interpret.

Frank

I did this
var <- ifelse(anaemia$wt <= 50, 1, 0)
ifelse(anaemia$wt > 50 & anaemia$wt <= 60, 2, var)
ifelse(anaemia$wt > 60, 3, var)
cbind(anaemia, var)
This does not work. Please let me know my mistake. Any suggestions welcome.
Thanks in advance.
Bhavin

Think you know your TV, music and film? Try Search Charades! <https://www.searchcharades.com>


--
Frank E Harrell Jr   Professor and Chair           School of Medicine
                     Department of Biostatistics   Vanderbilt University

<Prev in Thread] Current Thread [Next in Thread>