资源简介
m文件中给出了bp程序的源代码,大家可以下下来看看,这是从mathwork上找的比较权威
代码片段和文件信息
% Mann-Kendall Tau (aka Tau-b) with Sen‘s Method (enhanced)
% A non-parametric trend test
%
%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
%
% Important Note:
% I have also posted a Seasonal Kendell function at Mathworks
% sktt.m
%
%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
%
% revised 12/1/2008- Computed variance now takes into account ties in the
% time index with multiple observations per index.
% Added in confidence intervals for Sens Slope
%
% Syntax:
% [taub tau h sig Z S sigma sen n senplot CIlower CIupper D Dall C3]
% = ktaub(datain alpha wantplot)
%
% where:
% datain = (N x 2) double
% alpha = (scalar) double
% wantplot is a flag
% ~= 0 means create plot otherwise do not plot
%
% taub = Mann-Kendall coefficient adjusted for ties
% tau = Mann-Kendall coefficient not adjusted for ties
% n(n-1)/2
% h = hypothesis test (h=1 : is significant)
% sig = p value (two tailed)
% Z = Z score
% sigma = standard deviation
% sen = sen‘s slope
% plotofslope = data used to plot data and sen‘s slope
% cilower = lower confidence interval for sen‘s slope
% ciupper = upper confidence interval for sen‘s slope
%
% These next two variables are output because they are needed in the
% Seasonal Kendall function: sktt.m
% D = denominator used for calculating Tau-b
% Dall = denominator used for calculating Tau
% C3 = individual seasonal slopes aggregated for Sens Seasonal Slope
% nsigma = an assumed variance with all ties reconsidered but set to
% equal number of positive and negative differences.
%
%
% Modifications:
% 12/1/2008 - Taub = denominator is adjusted
% Tau = denominator is NOT adjusted
% (matches USGS Kendall.exe output)
% 1/17/2009 - checks for anomalies and provides solutions and/or
% notifications. In support of this for the Seasonal Kendall
% (which was also updated 1/17/2009) another term was added to
% the output of this function-- nsigma.
%
% When calculating trends there are a few situations that create anomalies
% in the estimates. Foremost when S = 0 significance will always be
% 100-percent which is not possible. When this occurs the p-value is
% adjusted by using the computed variance but assuming S = 1. However
% the output from the function will still show S=0 when the case arises.
%
% Secondly a statistically significant slope = 0 can occur when there are
% a large number of ties in the data. In this case a second test is done
% assuming the number of ties is equal an even number positive and negative
% differences. Significance is tested again but the output is only sent
% to the screen. The p-value returned in the function is still the
% original p-value (and the adjusted p-value for seri
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2472 2009-02-19 18:35 ex1.mat
文件 11903 2009-01-16 20:29 ktaub.m
文件 1332 2009-05-29 17:53 license.txt
评论
共有 条评论