How to construct qqplot confidence bands

Dear forum users,
I need to construct 95% white noise confidence intervals in the qqplot figure. Can anyone help me how to construct these. I am using the code
qqplot(y)
I want to test the hypothesis that "y" is a vector of white noise. Can i just take the line computed by qqplot and add/subtract 1.96*sqrt(length(y))??

3 comentarios

One way to obtain confidence intervals is to use simulations
qqplot(...)
%%
% Small sample size => use simulations:
nSim = 3000; % use this many data-point to simulate the quantiles
confidenceInterval = 0.95;
alpha = 1-confidenceInterval; % alpha risk
n = length(data);
xSim = sort(randn(nSim,n),2); % sorted random variables
zSim = mean(data) + xSim*std(data); % quantiles N(mu, sd)
qSim = quantile(zSim, [alpha/2, 1-alpha/2]); % quantiles
hold on
xVals = qnorm(([1:n]-0.5)/n); % theoretical quantiles
plot(xVals, qSim(:,:), 'b--');
hold off
Morten Nissov
Morten Nissov el 15 de Jun. de 2021
I don't think qnorm is a matlab function?
Scott MacKenzie
Scott MacKenzie el 15 de Jun. de 2021
In File Exchange there is a qnorm function

Iniciar sesión para comentar.

Respuestas (0)

Preguntada:

el 17 de En. de 2014

Comentada:

el 15 de Jun. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by