On Fri, 6 Jun 2014 11:16:11 AM Nwinters wrote:
> I have a variable coded in Stata as follows:
> **
> *gen sat_pm25cat_=.
> replace sat_pm25cat_= 1 if (sat_pm25>=4 & sat_pm25<=7.1 &
sat_pm25!=.)
> replace sat_pm25cat_= 2 if (sat_pm25>=7.1 & sat_pm25<=10)
> replace sat_pm25cat_= 3 if (sat_pm25>=10.1
... But I think the OP should consult his/her local statistician and
not do this.
1. Categorizing a continuous variable generally loses information.
While there may be times when this may be appropriate, generally
continuous variables should be modeled as such.
2. You also lose the ordering with
On Jun 6, 2014, at 11:16 AM, Nwinters wrote:
> I have a variable coded in Stata as follows:
> **
> *gen sat_pm25cat_=.
> replace sat_pm25cat_= 1 if (sat_pm25>=4 & sat_pm25<=7.1 & sat_pm25!=.)
> replace sat_pm25cat_= 2 if (sat_pm25>=7.1 & sat_pm25<=10)
> replace sat_pm25cat_= 3 if (sat_pm25>=10.1
I have a variable coded in Stata as follows:
**
*gen sat_pm25cat_=.
replace sat_pm25cat_= 1 if (sat_pm25>=4 & sat_pm25<=7.1 & sat_pm25!=.)
replace sat_pm25cat_= 2 if (sat_pm25>=7.1 & sat_pm25<=10)
replace sat_pm25cat_= 3 if (sat_pm25>=10.1 & sat_pm25<=11.3)
replace sat_pm25cat_= 4 if (sat_pm25>=11.
4 matches
Mail list logo