We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At least in simple cases, the output of the variance function should be of length the number of columns of the Y variable in input.
MWE (thanks to @ThomasDeroyon) :
data <- data.frame(id = 1:100, sex= c(rep(1, 50), rep(2, 50)), y = c(rnorm(50, 1, 3), rnorm(50, 2, 4)), weight = rep(10, 100)) # Dont't work variance_function <- function(y) 1 variance_wrapper <- gustave::define_variance_wrapper(variance_function = variance_function, reference_id = data$id, reference_weight = data$weight, default_id = "id") variance_wrapper(data, as.factor(sex)) # Works variance_function <- function(y) rep(1, NCOL(y)) variance_wrapper <- gustave::define_variance_wrapper(variance_function = variance_function, reference_id = data$id, reference_weight = data$weight, default_id = "id") variance_wrapper(data, as.factor(sex))
The text was updated successfully, but these errors were encountered:
martinchevalier
No branches or pull requests
At least in simple cases, the output of the variance function should be of length the number of columns of the Y variable in input.
MWE (thanks to @ThomasDeroyon) :
The text was updated successfully, but these errors were encountered: