Skip to content

Commit

Permalink
fixing rbin
Browse files Browse the repository at this point in the history
  • Loading branch information
AnestisTouloumis committed Jul 25, 2019
1 parent 4c627e9 commit 1c26593
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 48 deletions.
36 changes: 12 additions & 24 deletions R/rbin.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,40 +102,28 @@
#' beta_coefficients <- 0.2
#' latent_correlation_matrix <- toeplitz(c(1, 0.9, 0.9, 0.9))
#' x <- rep(rnorm(sample_size), each = cluster_size)
#' simulated_binary_dataset <- rbin(
#' clsize = cluster_size,
#' simulated_binary_dataset <- rbin(clsize = cluster_size,
#' intercepts = beta_intercepts, betas = beta_coefficients,
#' xformula = ~x, cor.matrix = latent_correlation_matrix, link = "probit"
#' )
#' xformula = ~x, cor.matrix = latent_correlation_matrix, link = "probit")
#' library(gee)
#' binary_gee_model <- gee(y ~ x,
#' family = binomial("probit"), id = id,
#' data = simulated_binary_dataset$simdata
#' )
#' binary_gee_model <- gee(y ~ x, family = binomial("probit"), id = id,
#' data = simulated_binary_dataset$simdata)
#' summary(binary_gee_model)$coefficients
#'
#' ## See Example 3.6 in the Vignette.
#' set.seed(8)
#' library(evd)
#' simulated_latent_variables1 <- rmvevd(sample_size,
#' dep = sqrt(1 - 0.9),
#' model = "log", d = cluster_size
#' )
#' simulated_latent_variables2 <- rmvevd(sample_size,
#' dep = sqrt(1 - 0.9),
#' model = "log", d = cluster_size
#' )
#' simulated_latent_variables1 <- rmvevd(sample_size, dep = sqrt(1 - 0.9),
#' model = "log", d = cluster_size)
#' simulated_latent_variables2 <- rmvevd(sample_size, dep = sqrt(1 - 0.9),
#' model = "log", d = cluster_size)
#' simulated_latent_variables <- simulated_latent_variables1 -
#' simulated_latent_variables2
#' simulated_binary_dataset <- rbin(
#' clsize = cluster_size,
#' simulated_binary_dataset <- rbin(clsize = cluster_size,
#' intercepts = beta_intercepts, betas = beta_coefficients,
#' xformula = ~x, rlatent = simulated_latent_variables
#' )
#' binary_gee_model <- gee(y ~ x,
#' family = binomial("logit"), id = id,
#' data = simulated_binary_dataset$simdata
#' )
#' xformula = ~x, rlatent = simulated_latent_variables)
#' binary_gee_model <- gee(y ~ x, family = binomial("logit"), id = id,
#' data = simulated_binary_dataset$simdata)
#' summary(binary_gee_model)$coefficients
#' @export
rbin <- function(clsize = clsize, intercepts = intercepts, betas = betas,
Expand Down
36 changes: 12 additions & 24 deletions man/rbin.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1c26593

Please sign in to comment.