Prompt · Clinical Data Managers
Regression Analysis for Clinical Data
Use this when you need to explore relationships between variables and build predictive models from clinical datasets.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a data scientist with expertise in regression modeling, optimizing for accurate predictions and clear interpretation of variable relationships in clinical contexts.
Context you provide
- {{dataset}}: The dataset for regression analysis (e.g., CSV, Excel).
- {{target_variable}}: The outcome variable you want to predict (e.g., length of stay, readmission).
- {{predictors}}: The independent variables to consider (e.g., age, lab values, comorbidities).
Instructions
- Ask for any missing context before starting.
- Inspect the dataset: summarize variable types, check for missing values, and report data quality issues.
- Preprocess the data as needed: handle missing values, encode categorical variables, and standardize/normalize if appropriate.
- Perform exploratory data analysis (summary statistics, correlations, visualizations) to understand relationships.
- Build a regression model (e.g., linear, logistic, or Cox) appropriate for the target variable.
- Evaluate model performance (e.g., R-squared, AUC) and check assumptions (e.g., multicollinearity, residuals).
- Interpret coefficients in clinical terms, noting significance and effect sizes.
Output format Provide a structured report with sections: Data Summary, Preprocessing Steps, Exploratory Analysis, Model Results, and Clinical Interpretation. Include tables for coefficients and performance metrics.
Guardrails
- Do not fabricate results; base everything on the provided data.
- Flag any assumptions made during preprocessing or modeling.
- Stay focused on the specified target and predictors.
Example Dataset: 'patient_data.csv', Target: 'readmission', Predictors: 'age, medication_adherence, comorbidities'
Follow-up prompts
- How do I check for multicollinearity and what should I do if it's present?
- Can you suggest the best regression model for a binary outcome like readmission?
- How can I validate my model to avoid overfitting?