Skip to content
Back to formatted view

Raw Message

Message-ID: <OF23F997FB.BB3A2528-ON80257520.004C2E41-80257520.004C6C7E@hsl.gov.uk>
Date: 2008-12-15T13:54:51Z
From: Richard Cotton
Subject: problem with Surv
In-Reply-To: <578384.18392.qm@web23205.mail.ird.yahoo.com>

> I'm trying to estimate a tobit model with  survrec function. I use 
> the following code : 
> reg<-survreg(Surv(crs_prod,crs_prod<=1)~SOLVA+log(AF088)
> +HHI+ACTIONNA,data=dat,dist="gaussian")
> 
> I get this error message with R 2.7.2 
> Error in survreg(Surv(crs_prod, crs_prod <= 1) ~ SOLVA + log(AF088) +  : 

>   Response must be a survival object

Take a look at Surv(crs_prod, crs_prod <= 1).  Your example isn't 
reproducible (tut tut), but if I had to guess, I'd say that this is NULL, 
because crs_prod is column in dat, and Surv can't find it.

Regards,
Richie.

Mathematical Sciences Unit
HSL



------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:20}}