projects
/
morpheus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Error when K > d for computeMu and optimParams
[morpheus.git]
/
pkg
/
R
/
optimParams.R
diff --git
a/pkg/R/optimParams.R
b/pkg/R/optimParams.R
index
8dfe3dc
..
175150f
100644
(file)
--- a/
pkg/R/optimParams.R
+++ b/
pkg/R/optimParams.R
@@
-45,8
+45,8
@@
optimParams <- function(X, Y, K, link=c("logit","probit"), M=NULL, nc=0)
if (!is.numeric(Y) || any(is.na(Y)) || any(Y!=0 & Y!=1))
stop("Y: binary vector with 0 and 1 only")
link <- match.arg(link)
if (!is.numeric(Y) || any(is.na(Y)) || any(Y!=0 & Y!=1))
stop("Y: binary vector with 0 and 1 only")
link <- match.arg(link)
- if (!is.numeric(K) || K!=floor(K) || K < 2)
- stop("K: integer >= 2")
+ if (!is.numeric(K) || K!=floor(K) || K < 2
|| K > ncol(X)
)
+ stop("K: integer >= 2
, <= d
")
if (is.null(M))
{
if (is.null(M))
{