Home > atmlab > circular > circ_vmpar.m

circ_vmpar

PURPOSE ^

r = circ_vmpar(alpha, w, d)

SYNOPSIS ^

function [thetahat kappa] = circ_vmpar(alpha,w,d)

DESCRIPTION ^

 r = circ_vmpar(alpha, w, d)
   Estimate the parameters of a von Mises distribution.

   Input:
     alpha    sample of angles in radians
     [w        number of incidences in case of binned angle data]
     [d    spacing of bin centers for binned data, if supplied 
           correction factor is used to correct for bias in 
           estimation of r, in radians (!)]

   Output:
     thetahat        preferred direction
     kappa       concentration parameter

 PHB 3/23/2009

 References:
   Statistical analysis of circular data, N.I. Fisher

 Circular Statistics Toolbox for Matlab

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

circ_vmpar.m

SOURCE CODE ^

0001 function [thetahat kappa] = circ_vmpar(alpha,w,d)
0002 
0003 % r = circ_vmpar(alpha, w, d)
0004 %   Estimate the parameters of a von Mises distribution.
0005 %
0006 %   Input:
0007 %     alpha    sample of angles in radians
0008 %     [w        number of incidences in case of binned angle data]
0009 %     [d    spacing of bin centers for binned data, if supplied
0010 %           correction factor is used to correct for bias in
0011 %           estimation of r, in radians (!)]
0012 %
0013 %   Output:
0014 %     thetahat        preferred direction
0015 %     kappa       concentration parameter
0016 %
0017 % PHB 3/23/2009
0018 %
0019 % References:
0020 %   Statistical analysis of circular data, N.I. Fisher
0021 %
0022 % Circular Statistics Toolbox for Matlab
0023 
0024 % By Philipp Berens, 2009
0025 % berens@tuebingen.mpg.de
0026 
0027 alpha = alpha(:);
0028 if nargin < 2
0029   w = ones(size(alpha));
0030 end
0031 if nargin < 3
0032   d = 0;
0033 end
0034 
0035 r = circ_r(alpha,w,d);
0036 kappa = circ_kappa(r);
0037 
0038 thetahat = circ_mean(alpha,w);

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005