gwr_st.m文件不全吧,其代码如下:
function result = gwr_st(y,x,east,north,t,info);
% PURPOSE: compute spatial and temporal geographically weighted regression
%----------------------------------------------------
% USAGE: results = gwr_st(y,x,east,north,info)
% where: y = dependent variable vector
% x = explanatory variable matrix
% east = x-coordinates in space
% north = y-coordinates in space
% t= time coordinates
% info = a structure variable with fields:
% info.bwidth = scalar bandwidth to use or zero
% for cross-validation estimation (default)
% info.bmin = minimum bandwidth to use in CV search
% info.bmax = maximum bandwidth to use in CV search
% defaults: bmin = 0.1, bmax = 20
% info.dtype = 'gaussian' for Gaussian weighting (default)
% = 'exponential' for exponential weighting
% = 'tricube' for tri-cube weighting
% info.q = q-nearest neighbors to use for tri-cube weights
% (default: CV estimated)
% info.qmin = minimum # of neighbors to use in CV search
% info.qmax = maximum # of neighbors to use in CV search
% defaults: qmin = nvar+2, qmax = 4*nvar
% ---------------------------------------------------
% RETURNS: a results structure
% results.meth = 'gwr_st'
% results.beta = bhat matrix (nobs x nvar)
% results.tstat = t-stats matrix (nobs x nvar)
% results.yhat = yhat
% results.resid = residuals
% results.sige = e'e/(n-dof) (nobs x 1)
% results.nobs = nobs
% results.nvar = nvars
% results.bwidth = bandwidth if gaussian or exponential
% results.q = q nearest neighbors if tri-cube
% results.dtype = input string for Gaussian, exponential weights
% results.iter = # of simplex iterations for cv
% results.north = north (y-coordinates)
% results.east = east (x-coordinates)
% results.y = y data vector
%---------------------------------------------------
% See also: prt,plt, prt_gwr, plt_gwr to print and plot results
%---------------------------------------------------
% References: Brunsdon, Fotheringham, Charlton (1996)
% Geographical Analysis, pp. 281-298
%---------------------------------------------------
% NOTES: uses auxiliary function scoref for cross-validation
%---------------------------------------------------
% written by: James P. LeSage 2/98
% University of Toledo
%---------------------------------------------------
% revised by: Bo Huang 9/2008
% The Chinese University of Hong Kong
% References: Huang Bo (2010) Geographically and Temporally Weighted Regression for Spatiotemporal modeling of House Prices.
% International Journal of Geographical Information Science, pp. 383-401.
%---------------------------------------------------
if nargin == 6 % user options
if ~isstruct(info)
error('gwr_st: must supply the option argument as a structure variable');
else
|