Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Please help me to translate this code in to R language. I want to find out critical values for lag 10, 20 and 30. I have attached the matlab code.
조회 수: 1 (최근 30일)
이전 댓글 표시
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% FUNCTION quantileQmax(L,p,iprob) %
% computes quantiles of statistic Qmax at level 1-alpha %
% when max autocorrelation is at lag p %
% and the largest computed lag is L %
% probability levels: iprob=1 alpha=0.10 %
% iprob=2 alpha=0.01 %
% any other iprob: alpha=0.05 %
% %
% Matlab functions required: fzero, chi2inv %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function qqq= quantileQmax(L,p,iprob)
if iprob==1
alpha=0.1;
elseif iprob==2
alpha=0.01;
else
alpha=0.05;
end
x0=chi2inv(1-alpha,p);
qqq=fzero(@(x)(qnoncondp(x,p,L)-1+alpha),x0);
end
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!