Skip to content
Prev 163810 / 398506 Next

Formula parsing and updating

On Thu, 4 Dec 2008, Johannes Huesing wrote:

            
You need to give us something to reproduce. I get an error when I try
Error in model.matrix.default(newTerms, m) :
   model frame and formula mismatch in model.matrix()

so I do not see how you obtained 'somemod'.

When I protect with I(quant>0), I have no problems obtaining 'fit' nor 
update()ing it:
Call:
coxph(formula = Surv(time, status) ~ I(quant > 0) + strata(sex),
     data = test1)


                    coef exp(coef) se(coef)      z    p
I(quant > 0)TRUE -0.746     0.474     1.27 -0.589 0.56

Likelihood ratio test=0.37  on 1 df, p=0.545  n=6 (1 observation deleted 
due to missingness)


HTH,

Chuck
Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901