Saeed Abu Nimeh
2010-Jul-09 22:33 UTC
[R] Function similar to combine.levels in Hmisc package
Is there a function similar to combine.levels ( in the Hmisc package) that combines the levels of factors, but not based on their frequency. Alternatively, I am looking into using the significance of the dummy variables of factors based on their Pr(>|t|) value using the linear model, then deleting the non-significant levels. Any other suggestions? Thanks, Saeed
Frank E Harrell Jr
2010-Jul-10 00:12 UTC
[R] Function similar to combine.levels in Hmisc package
On 07/09/2010 05:33 PM, Saeed Abu Nimeh wrote:> Is there a function similar to combine.levels ( in the Hmisc package) > that combines the levels of factors, but not based on their frequency. > Alternatively, I am looking into using the significance of the dummy > variables of factors based on their Pr(>|t|) value using the linear > model, then deleting the non-significant levels. Any other > suggestions? > Thanks, > SaeedThat is not a valid statistical procedure. You will not have the correct d.f. in the final F test. Frank -- Frank E Harrell Jr Professor and Chairman School of Medicine Department of Biostatistics Vanderbilt University