AiTeky Original Interactive Learning & Practice Intermediate
R for health, pharma and insurance: trials, survival curves and claim models
Analyse a blood-pressure trial, draw Kaplan-Meier curves, compare treatments with the log-rank test and Cox model, and price motor insurance with Poisson claim models, then write a trial readout and a pricing note.
Hospitals, drug companies, research groups and insurers use R more than any other industry. Clinical trial results sent to drug regulators are often produced in R. Survival curves in medical papers and claim models at insurers are R's home ground.
This course takes the statistics you already know and applies it to the questions these teams ask every day: did the drug lower blood pressure, how long do patients stay free of disease, does the new treatment cut the risk, and how often will this driver claim?
You need R basics, the first two tidyverse lessons and the statistics in R course (t-tests, prop.test() and
glm()).
We use a 12-week blood-pressure trial, a two-arm cancer trial with follow-up times, and 4,000 motor insurance policies. All three datasets are made up for teaching, with patterns like the real thing.
- Learn lessons explain one method at a time, with small exercises you can try again and again.
- Industry ready lessons give you real files, real questions and the interview questions that go with them.
:::watch Teaching data, not medical advice The trials in this course are made up. Real trial analyses follow a written analysis plan agreed before the data is unblinded, and are checked by a second programmer. This course shows the methods, not a shortcut around that. :::
- βΆ Run code in your browser. Nothing to install
- β Exercises that check themselves
- π Tap a word to see what it means
Locked. Sign up free
Learn
Understand each idea with everyday examples. No coding background needed.
- 01 30 min Free sample π AiTeky Pass A blood-pressure trial: the baseline table and the main result Read a two-arm trial file, build the baseline table that opens every trial report, compare the change in blood pressure between arms with a t-test and a Wilcoxon test, and compare side-effect rates.
- 02 35 min π AiTeky Pass Time to event: censoring and Kaplan-Meier curves Store follow-up time and events with Surv(), see why patients still well at the end cannot be dropped, estimate survival with survfit(), read survival at 12 and 24 months and the median, and draw a curve for each arm.
- 03 35 min π AiTeky Pass Comparing treatments: the log-rank test and the Cox model Test whether two survival curves differ with survdiff(), estimate a hazard ratio with coxph(), adjust it for age and stage, read the intervals, and check the model's main assumption with cox.zph().
- 04 35 min π AiTeky Pass Counting claims: Poisson regression with an exposure offset Work out claim frequency per policy-year, see why part-year policies need an exposure offset, fit glm(family = poisson) with offset(log(exposure)), read rate ratios, and predict the expected claims for a new driver.
Industry ready
Real problems from real jobs, and the questions interviewers ask about them.
- 05 45 min π AiTeky Pass On the job: the readout for a cancer trial Produce the main tables of a two-arm cancer trial in R, from the baseline table to Kaplan-Meier numbers, the log-rank test, the adjusted Cox hazard ratio, the assumption check and a careful subgroup table, then write the readout and practise the interview questions.
- 06 50 min π AiTeky Pass On the job: price motor insurance with frequency and severity models Build a motor insurer's pricing model in R, from claim frequency by factor and a Poisson model to an overdispersion check with quasi-Poisson, a Gamma model for claim size, the pure premium, a rating table and an actual-against-expected check, then practise the interview questions.

