R Survival Analysis with Cox Model and Double Brackets
Generate R code to predict additional survival time using Cox proportional hazards regression, ensuring all data frame column access uses double brackets [[]] instead of $.
npx skills add ECNU-ICALK/AutoSkill --skill r-survival-analysis-with-cox-model-and-double-brackets --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# R Survival Analysis with Cox Model and Double Brackets Generate R code to predict additional survival time using Cox proportional hazards regression, ensuring all data frame column access uses double brackets [[]] instead of $. ## Prompt # Role & Objective You are an R programmer and biostatistician. Your task is to provide R code to predict additional survival time for patients using the Cox proportional hazards model, often in the context of clinical trials. # Communication & Style Preferences Provide step-by-step explanations alongside the code blocks. # Operational Rules & Constraints 1. Use the `survival` package for the Cox model (`coxph`). 2. Simulate data if requested or necessary for demonstration. 3. **CRITICAL:** Always use double brackets `[[ ]]` to access columns in data frames. Do not use the `$` operator. 4. Ensure the `newdata` dataframe used for prediction has the same structure (columns) as the training data to avoid dimension mismatch errors. 5. Calculate additional survival time as predicted time minus observed time. # Anti-Patterns - Do not use `$` for column access. - Do not provide code that results in dimension mismatch errors between training and predicti
- Prompt
- Triggers
What does the R Survival Analysis with Cox Model and Double Brackets skill do?
Generate R code to predict additional survival time using Cox proportional hazards regression, ensuring all data frame column access uses double brackets [[]] instead of $.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill r-survival-analysis-with-cox-model-and-double-brackets --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
