Re: How to set alpha with robustfit function
- From: "Tom Lane" <tlane@xxxxxxxxxxxxx>
- Date: Wed, 6 Jun 2007 12:59:19 -0400
Eddy, I probably don't understand your question, since t-statistic
computations don't require alpha. Instead they produce a p-value.
Here's an illustration of how I can get confidence intervals from a
combination of robustfit and nlparci. Maybe this will help.
-- Tom
% Fit by least squares, get confidence intervals two ways
x = (1:10)';
randn('state',0);
y = 10 - 2*x + randn(10,1); y(10) = 0;
X = [ones(10,1) x];
[bls1,bci1,resid] = regress(y,X);
bci2 = nlparci(bls1,resid,'jacobian',X);
bci1,bci2
% Use robustfit to do least squares, get confidence intervals from nlparci
[bls2,st] = robustfit(x,y,@(r) ones(size(r)),1);
bci3 = nlparci(bls2,st.resid,'cov',st.covb);
bls1,bls2
bci3
% Use robustfit to do a robust fit, get confidence intervals from nlparci
[brob,st] = robustfit(x,y);
bcirob1 = nlparci(brob,st.resid,'cov',st.covb);
brob,bcirob1
% Change alpha to get 90% confidence intervals
bcirob2 = nlparci(brob,st.resid,'cov',st.covb,'alpha',0.1)
"Eddy Letsoalo" <eddy.letsoalo@xxxxxxxx> wrote in message
news:ef58f81.1@xxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Tom,
Thanks for your tip. However, I wonder whether you have understood my
question very well.
In fact, I am using both the regress and robustfit functions. With
regress, I can enter alpha as an argument but the outcome does not
display t-values rather confidence intervals. I then use robustfit
function and get more detailed results with t-stats. However, alpha
is not an explicit argument.
Is there a way to set say alpha = 0.1, 0.01, etc. and get
ready-computed t values?
Thanks,
Eddy
Eddy Letsoalo wrote:
Dear MATLAB users,
Can somebody advise me how to set a confidence interval (alpha)
with
robustfit function other than the 0.05 level of significance.
Thanks in advance
.
- Follow-Ups:
- Re: How to change robustfit function arguments?
- From: Eddy Letsoalo
- Re: How to change robustfit function arguments?
- References:
- How to set alpha with robustfit function
- From: Eddy Letsoalo
- Re: How to set alpha with robustfit function
- From: Eddy Letsoalo
- How to set alpha with robustfit function
- Prev by Date: Re: Inserting elements in a structure
- Next by Date: how to read txt file
- Previous by thread: Re: How to set alpha with robustfit function
- Next by thread: Re: How to change robustfit function arguments?
- Index(es):
Relevant Pages
|