Message Boards Message Boards

Failed to import CSV data for SurvivalModelFit

Posted 2 years ago

My problem is rather trivial. I am doing a survival analysis for my Master's in healthcare management.

I have data in Excel in the format Cloumn 1: Event, Column 2: Censoring [-1,0,1] for left, right, no censoring for each observation. All my attempts to import the Excel data (excel format, CSV format) have failed to yield usable data for "Eventdata" and "SurvivalModel"-Fit. The problem is that I cannot get the censor data information to be just integers and I always get the result "is no valid censoring format", i.e. I would need "0., -1. etc. to be just lists of {0,1,-1.....}. It works just fine, if I correct the data by hand, but that is error prone and rather tedious for 800 observation in intervention and control. Any help, much appreciated. Christa

POSTED BY: Chris Ernst
2 Replies
Posted 2 years ago

Please attach a sample of e.g. the first 10 rows of your Excel file to your question.

POSTED BY: Rohit Namjoshi

Welcome to Wolfram Community!
Please make sure you know the rules: https://wolfr.am/READ-1ST
Please include your trials in terms of code using one of the methods explained in the rules.
Please EDIT your post and make sure code blocks start on a new paragraph and look framed and colored like this.

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

You can also embed notebook or attach notebook.

enter image description here

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract