Fix M arg list --> vector in OptimParams
authorBenjamin Auder <benjamin.auder@somewhere>
Mon, 16 Dec 2019 18:55:03 +0000 (19:55 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Mon, 16 Dec 2019 18:55:03 +0000 (19:55 +0100)
pkg/R/optimParams.R

index d8e2cf9..894aebd 100644 (file)
@@ -51,6 +51,8 @@ optimParams <- function(X, Y, K, link=c("logit","probit"), M=NULL)
     M3 <- as.double(Mtmp[[3]])
     M <- c(M1, M2, M3)
   }
     M3 <- as.double(Mtmp[[3]])
     M <- c(M1, M2, M3)
   }
+  else
+    M <- c(M[[1]], M[[2]], M[[3]])
 
   # Build and return optimization algorithm object
   methods::new("OptimParams", "li"=link, "X"=X,
 
   # Build and return optimization algorithm object
   methods::new("OptimParams", "li"=link, "X"=X,