http://www.realclimate.org/index.php/archives/2010/04/science-story-the-making-of-a-sea-level-study/

Are the endpoint issues solved now?

Not sure if they matter at all in Vermeer et al, but I think the conversation should continue, this is interesting topic!

]]>cumsum(randn(300,1)*.2)+randn(300,1);

turns to

Hhh=tril(ones(300));

Iii=eye(300)*0.2;

Ccc=(Hhh*Iii)*(Hhh*Iii)’+eye(300);

Cout=CC*Ccc*CC’;

and

noisemodel=@()smooth(randn(300,1),5)*2;

(hmm, not sure how smooth.m handles endpoints, let’s try Roman’s method)

S5=zeros(300);

for i=1:300

tt=zeros(300,1);

tt(i)=1;

S5(:,i)=smooth(tt,5);

end

Ccc=S5*4*S5′;

Cout=CC*Ccc*CC’;

and then sE_R=sqrt(diag(Cout)) gives values that will pass the test the little frequentist in me wrote in #246.

]]>replace original ssatrend.m lines

R=filter(tfilt,1,paddedX);

R=R((1:n)+M*2-1);

with

%% start UC mod.

%paddedX (minimumroughness) can be though as matrix B times the input series:

idx=(n-mp+(1:mp)’);

Xi=[idx ones(M,1)];

Xi2=[n+(1:M)’ ones(M,1)];

Be=Xi2*pinv(Xi);

idx=(1:M)’;

Xi=[idx ones(M,1)];

Xi2=[(-(M-1):0)’ ones(M,1)];

Bs=Xi2*pinv(Xi);

BsZ=[Bs zeros(M,n-M)];

BeZ=[zeros(M,n-M) Be];

Ii=eye(n);

B=[BsZ;Ii;BeZ];

%% now B*x equals paddedX ( x is the input series )

%% next, filter(tfilt,1, .. in ‘matrix times vector’ -format:

tt=[tfilt;zeros(length(paddedX)-length(tfilt),1)];

F=tril(toeplitz(tt));

%% and finally, chop the padded values

Z=[zeros(n,M*2-1) Ii zeros(n,1)];

%% now, Z*F*B*x equals R ..

CC=Z*F*B;

R=CC*x;

%% .. and unity variance white noise process covariance (I) propagates through the filter:

Cout=CC*CC’;

%% end UC mod.

It seems that you want even wider CIs near the endpoints. Once again, let’s first answer correctly to question “What happens to whitenoise if it goes through ssatrend?” Moore05 need to be fixed, and Rahmstorf’s conclusions are invalid. Shouldn’t make much difference to the big picture, right?

]]>ssatrend.m:

% SE_R: standard error of the R (how much of sE_x is remaining in R).

how much of 0 is remaining in R ?

]]>Re: Jean S (#254),

The issue is that you make your predictions based on noisy observations, i.e., you have an additional uncertainty associated with the prediction itself. This is assessed in my code by the noisy padding process within your Monte Carlo simulation.

I do not believe that it is assessed correctly in your code. That is why I ask you to consider the case sE_x=0. That would result in sE_R=0, if I read your code-snippet in #251 correctly. That is sE_R=0 is clearly wrong, because even with sE_x=0 there would still be a prediction error. To test it you can try: ssatrend(cos(1:200),11,0).

]]>The new version seems to output different R than the previous. But here’s the difference approx. difference between Jean’s and ssatrend.m ver4 uncertainties

( changed line

CI=prctile(mcreal’,[5 95])’;

to

CI=prctile(mcreal’,[2.5 97.5])’;

to match better with sE_R*2 used in earlier versions )