Fix default weights, fix reporting scripts
[morpheus.git] / pkg / R / optimParams.R
index 4f886ac..06d1684 100644 (file)
@@ -59,7 +59,7 @@ optimParams = function(K, link=c("logit","probit"), optargs=list())
 
   weights <- optargs$weights
   if (is.null(weights))
-    weights <- rep(1, K)
+    weights <- rep(1, 3)
 
        # Build and return optimization algorithm object
        methods::new("OptimParams", "li"=link, "M1"=as.double(M[[1]]),
@@ -86,6 +86,7 @@ setRefClass(
                M1 = "numeric", #order-1 moment (vector size d)
                M2 = "numeric", #M2 easier to process as a vector
                M3 = "numeric", #M3 easier to process as a vector
+               weights = "numeric", #weights on moments
                # Dimensions
                K = "integer",
                d = "integer"