diff rDiff/src/variance/estimate_variance.m @ 0:0f80a5141704

version 0.3 uploaded
author vipints
date Thu, 14 Feb 2013 23:38:36 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rDiff/src/variance/estimate_variance.m	Thu Feb 14 23:38:36 2013 -0500
@@ -0,0 +1,7 @@
+function [VARIANCE]=estimate_variance(MEANS,VARS) 
+%estimates the variance using the locfit package
+
+IDX_ZERO=and(VARS>=0,MEANS>0);
+VARIANCE =locfit(log(MEANS(IDX_ZERO)),VARS(IDX_ZERO),'family','gamma','acri','cp','deg',2,'maxk',1000);
+
+return