0

enter image description here

So this table is from a file that I display using the R code: [read.csv()].

Question: I am now ask to estimate the probability of success using the parametric method and calculate its 95% confidence intervals using the exact method according to the age and then according to the sex (Male=1, female=2).

Attempts: For the parametric method using R I thought about binom.approx. Don't know if I am right and even how to do it. For the exact method I guessed binom.confint(,,method="exact"). Again here how to code it.

Hamed Said
  • 41
  • 1
  • 3
  • 1
    From the data it would appear that logistic regression would be most appropriate. – Allan Cameron Dec 07 '20 at 22:50
  • @AllanCameron Okay then the probability of success would be written as a function of the age and/or sex. That is for example: `model1<-glm(Y~Age,family = binomial(link = logit), data=TBData1)` . Now what about the exact method to get the the confidence interval from that probability of success? – Hamed Said Dec 08 '20 at 10:38
  • Your regression would be more like `model1<-glm(Y~Age + factor(Sex), family = binomial(link = logit), data=TBData1)`. You would then get a prediction with confidence intervals by using `predict` at whatever values of `Age` and `Sex` you want. – Allan Cameron Dec 08 '20 at 12:44

0 Answers0