[R] validate function in Design library does not work with small samples

spok spok_1 at yahoo.com
Fri Apr 25 16:45:16 CEST 2003


Hi,

I am using the validate function in the design library
to get corrected Somer's Dxy for cox ph models.  When
my sample size is reduced from 300 to 150, the
function complains (length of dimnames[1] not equal to
array) and does not produce any results.  There are no
missing values in the data.  Any suggestions for a
work-around?

Thank you in Advance.

>
f.total=cph(Surv(fu,censor)~predictor+pred2+pred3,data=data,x=T,y=T,surv=T)
> set.seed(6)
> val.step=validate(f.total,B=155,bw=T)

                Backwards Step-down - Original Model

No Factors Deleted

Factors in Final Model

[1] pred2
.Random.seed: 1 -1021164091 1170333634 in .GlobalEnv 
Iteration:
1 2 3 4 5 6 7 Error in fit(NULL, y[train, , drop =
FALSE], iter = i, tol = tol, ...) : 
        length of dimnames[1] not equal to array
extent
> val.step



More information about the R-help mailing list