Hey, I have a problem using the glm function for the logistic regression model.

For the logistic model, the survival probability is: P(y=1|x) = exp(b0+b1*x) / (1+exp(b0+b1*x))
The link function is: b0+b1*x

My question is: If I changed the function of the survival probability to the following: P(y=1|x) = (exp(b0+b1*x) / (1+exp(b0+b1*x)) ) ^t, how should I do the regression using the glm? How can I add the "t" into the function as a predictor variable? Or should I revise the link function?

Give an example here:

> y=c(0,1,1,0,1,1,1,1,0,0,1,0,1,0,0)
> x1=rnorm(length(y))
> t=sample(1:30,length(y),replace=TRUE)
> (dat1=data.frame(y,x1,t))
   y         x1  t
1  0  0.6486104 23
2  1  0.6989650  9
3  1 -1.6542582  9
4  0 -0.2465761 30
5  1  1.7133463 17
6  1 -0.3536826 20
7  1  0.4766255  3
8  1 -0.3549167  2
9  0  0.3203217 22
10 0  0.6136343  3
11 1 -0.3993963 29
12 0  0.8339387  3
13 1  0.5359685 17
14 0  0.2322983  4
15 0  0.7317251 21
> rm(y,x1,t)
> res1=glm(y~x1,family=binomial(link ="logit"), data=dat1)  ### How can I add the "t" into the function as a predictor variable
> summary(res1)
Call:
glm(formula = y ~ x1, family = binomial(link = "logit"), data = dat1)
Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.3999  -1.1258   0.6282   1.0614   1.5764  
Coefficients:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)   0.3317     0.5853   0.567    0.571
x1           -0.7200     0.7948  -0.906    0.365
(Dispersion parameter for binomial family taken to be 1)
    Null deviance: 20.728  on 14  degrees of freedom
Residual deviance: 19.792  on 13  degrees of freedom
AIC: 23.792
Number of Fisher Scoring iterations: 4


Jian

	[[alternative HTML version deleted]]


