Skip to content

address situation when nsubjects is a vector of length > 1#226

Open
sbanville-delfi wants to merge 1 commit into
Kenkleinman:masterfrom
delfidiagnostics:fix-cps.binary
Open

address situation when nsubjects is a vector of length > 1#226
sbanville-delfi wants to merge 1 commit into
Kenkleinman:masterfrom
delfidiagnostics:fix-cps.binary

Conversation

@sbanville-delfi
Copy link
Copy Markdown

The cps.binary function gives an error when running the second example from the documentation. This occurs when nsubjects is a vector of length > 1.

This example

binary.sim2 <-
  cps.binary(
    nsim = 100,
    nsubjects = c(c(rep(10,9),100), rep(20,10)),
    nclusters = 10,
    p1 = 0.8,
    p2 = 0.5,
    sigma_b_sq = 1,
    sigma_b_sq2 = 1.2,
    alpha = 0.05,
    method = 'gee',
    allSimData = FALSE
)

outputs the following error:

Error in cps.binary(nsim = 100, nsubjects = c(c(rep(10, 9), 100), rep(20,  : 
  could not find function "cps.binary"

This PR addresses this by requiring all elements of nsubjects to meet the requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant