[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-help
Subject:    [R] Fastbw() function: grouping of variables
From:       "Mourik-2, M.S.M. van" <M.S.M.vanMourik-2 () umcutrecht ! nl>
Date:       2013-04-30 14:15:47
Message-ID: E5F7A1BADD8F404EBE447CB35C77924E12BFAC4F () EXMB2502 ! ds ! umcutrecht ! nl
[Download RAW message or body]

Dear R users,

For the purpose of validating a prediction model using validate() from the rms \
package, I am running into some trouble with using the fastbw() function breaking up \
natural groups of variables.

Is there any way I can specify to keep certain variable together? In particular, if \
interactions are included I would also like to keep the main effects in the model. \
Another example is a group of comorbidity variables that I would like to be assessed \
all together and not as separate components as this makes more sense from the \
perspective of interpretation.

The Force = ... option seems to only work for pre-specified variables and does not \
solve my problem. In the case of the comorbidites, the variables are not mutually \
exclusive, so I would be very difficult to recode them as a factor variable with \
multiple levels.

Examples:
fit1 <-lrm(outcome~age + gender + med_a + med_b + med_a:med_b, x = TRUE, y = TRUE, \
data = example) fastbw(fit1, type = "residual).
--> fastbw may drop med_a and keep the med_a:med_b interaction instead.

fit2 <-lrm(outcome~age + gender +  comorb_a + comorb_b + comorb_c + other predictors, \
x = TRUE, y = TRUE, data = example) fastbw(fit2, type = "residual).
--> fastbw may drop some of the comorbidities, but  I would like to consider them as \
one group.

Any help is much appreciated!

Maaike


------------------------------------------------------------------------------

De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht
ontvangt, wordt u verzocht de inhoud niet te gebruiken en de afzender direct
te informeren door het bericht te retourneren. Het Universitair Medisch
Centrum Utrecht is een publiekrechtelijke rechtspersoon in de zin van de W.H.W.
(Wet Hoger Onderwijs en Wetenschappelijk Onderzoek) en staat geregistreerd bij
de Kamer van Koophandel voor Midden-Nederland onder nr. 30244197.

Denk s.v.p aan het milieu voor u deze e-mail afdrukt.

------------------------------------------------------------------------------

This message may contain confidential information and is...{{dropped:14}}

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic