Re: [R] Forced inclusion of varaibles in validate command as well as step

2012-07-20 Thread D. Lofaro
Dear prof. Harrell,

I'm not able to use the force option with fastbw, here an example of the error 
I've got (dataset stagec rpart package):

 fitstc - cph(Surv(stagec$pgtime,stagec$pgstat) ~ age + eet + g2 + grade + 
 gleason + ploidy, data=stagec)
 fbwstc - fastbw(fitstc,rule=aic,type=individual)
 fbwstc

 Deleted Chi-Sq d.f. P  Residual d.f. P  AIC
 eet 0.19   10.6610 0.19 10.6610 -1.81
 age 0.74   10.3889 0.93 20.6266 -3.07
 gleason 1.91   10.1673 2.84 30.4167 -3.16

Approximate Estimates after Deleting Factors

   CoefS.E. Wald Z P
g2 -0.03498 0.01843 -1.898 5.774e-02
grade   1.71963 0.35008  4.912 9.012e-07
ploidy  0.66700 0.25084  2.659 7.836e-03

Factors in Final Model

[1] g2 grade  ploidy
 fbwstc - fastbw(fitstg,rule=aic,type=individual,force=2)
Warning message:
In fastbw(fitstg, rule = aic, type = individual, force = 2) :
  force probably does not work unless type=individual
 fbwstc

Parameters forced into all models:
 eet

 Deleted Chi-Sq d.f. P  Residual d.f. P  AIC
 age 0.72   10.3960 0.72 10.3960 -1.28
 eet 0.21   10.6432 0.93 20.6266 -3.07
 gleason 1.91   10.1673 2.84 30.4167 -3.16

Approximate Estimates after Deleting Factors

   CoefS.E. Wald Z P
g2 -0.03498 0.01843 -1.898 5.774e-02
grade   1.71963 0.35008  4.912 9.012e-07
ploidy  0.66700 0.25084  2.659 7.836e-03

Factors in Final Model

[1] g2 grade  ploidy

Sorry if I bother you

best regards

Danilo Lofaro
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 Academisch Medisch Centrum 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 Amsterdam onder nr. 34362777. De Algemene Inkoop Voorwaarden 
van het AMC zijn van toepassing op en maken integraal onderdeel uit van alle 
rechtsbetrekkingen, daaronder mede verstaan alle inkoop opdrachten en 
overeenkomsten, tussen AMC en derden. Deze voorwaarden zijn te raadplegen op 
www.amc.nl en worden op verzoek toegezonden.



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

__
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.


Re: [R] Forced inclusion of varaibles in validate command as well as step

2011-02-26 Thread Frank Harrell
Jon,

Version 3.3-0 of rms will be released within 2-3 days.  It has a new option
force for fastbw, validate, calibrate.  force is an integer vector of the
parameter numbers to force into every model.  It is meant to work with
type='individual' and its performance with type='residual' needs to be
studied (I doubt if it works as you want).  Suppose you have a Cox model
(which does not have an intercept to include in the sequential numbering for
force) like this:

f - cph(S ~ sex + pol(age,2) + rcs(height,4))

and you want to force age into every model.  You would specify force=2:3. 
Typing coef(f) will show you the sequential parameters in the model. 
Someday I'll extend this to force='age' but that's not in the current
version.  Note that fastbw always pools age and age^2 effects when judging
significance.

As always use stepwise methods at your own risk.  They are dangerous to your
health.

If you are using Linux I can send the new version by e-mail.

Frank

-
Frank Harrell
Department of Biostatistics, Vanderbilt University
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Forced-inclusion-of-varaibles-in-validate-command-as-well-as-step-tp3324901p3325922.html
Sent from the R help mailing list archive at Nabble.com.

__
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.