X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=pkg%2FR%2FoptimParams.R;h=06d16845d5784e0140fbcb4c255bef2c6196c8c6;hb=0ad4c8de650e9f27ec3754c9cb9b2a03db5aff24;hp=4f886ac3fbd60139c8350e2222cb382c791b49d0;hpb=9e41efa28ed1ea6cb209797620afa97ae36a71e2;p=morpheus.git diff --git a/pkg/R/optimParams.R b/pkg/R/optimParams.R index 4f886ac..06d1684 100644 --- a/pkg/R/optimParams.R +++ b/pkg/R/optimParams.R @@ -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"