Skip to content

Commit

Permalink
Update sim2.R
Browse files Browse the repository at this point in the history
Update on the documentation of sim2
  • Loading branch information
Theo-qua authored Dec 13, 2023
1 parent 4a098f2 commit 411ea71
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions R/sim2.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#' Simulate data for the model
#' @title Simulate data for the model. This is the second simulation data used in the paper
#' @description Simulate data for the model
#' @param p column for X which is the main effect
#' @param n number of observations
#' @param m number of responses
#' @param nz TODO: fill in (number of modifiers?)
#' @param rho TODO: fill in (correlation between the main effect and modifiers?)
#' @param B.elem TODO: fill in (the proportion of non-zero elements in beta?)
#' @param nz number of modifiers
#' @param rho values to be used in the covariance matrix when generating X
#' @param B.elem the value of the non-zero elements in beta?
#' @return The simulated data with the following components:
#' Beta: matrix of actual beta coefficients p by D
#' Theta: a D by p by K array of actual theta coefficients
#' Y: a N by D matrix of response variables
#' Beta: matrix of actual beta coefficients p by m
#' Theta: a m by p by K array of actual theta coefficients
#' Y: a N by m matrix of response variables
#' X: a N by p matrix of covariates
#' Z: a N by K matrix of modifiers

#' @export
sim2 <- function(p = 500, n = 100, m = 24, nz = 4, rho = .4, B.elem = 0.5) {
b <- 10
Expand Down

0 comments on commit 411ea71

Please sign in to comment.