confidence intervals for line and corresponding normcdf

Dear guys,
I am going to get the 95% CIs for the regression line and the corresponding cdf. The code is shown below:
n = 40;
x = 10*rand(n,1);
x = sort(x);
y = 5 + .5*x + randn(n,1);
pos = y>8;
y = min(y,8);
figure(1);plot(x,y,'o');hold on;
The data is censored so I used maximum likelihood estimation to get the values of slope and intercept for the linear regression line. Could somebody tell me how to calculate CIs for this line? I know how to do it when the data is uncensored, but for ecnsored data I am not sure they are using the same method?
Also for uncensored data I know how to get information matrix which will be used in normcdf function. Again, for censored data, I am not sure it is appropriate to use the same method.
Thank you for the help in advance!
David

Antworten (1)

Daniel Shub
Daniel Shub am 30 Jun. 2011

0 Stimmen

The question is not so clear to me and is outside my area of expertise, but I will give it a stab ...
Have you thought about a bootstrap to get the confidence intervals? Basically instead of getting the slope and intercept once, you do it many times (100+). Each time you give it a slightly different set of x and y. The way the x and y are chosen for each fit is taking your full set of n points (40 in this case) and choosing 40 of them randomly with replacement (that means that point 7 might be chosen 5 times and point 8 might never be chosen). If you have 100 fits, the 2nd lowest and 2nd highest slope give you the 96% confidence interval.
As for the normcdf part, I have no idea what you are talking about.

1 Kommentar

David
David am 30 Jun. 2011
Hi Daniel,
Thank you for your answer. But I think it is not what I am looking for. Thank you for your help anyway.
David

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 27 Jun. 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by