Skip to content
New issue

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

Valmeta using Poisson/Log #2

Open
NightlordTW opened this issue Nov 1, 2022 · 1 comment
Open

Valmeta using Poisson/Log #2

NightlordTW opened this issue Nov 1, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@NightlordTW
Copy link
Contributor

NightlordTW commented Nov 1, 2022

Hi Thomas,

I saw you updated the CRAN version of the package recently and it caused some new errors in the JASP implementation. I think that they are related to the "pars" argument in the fitting function (passing model.oe = "poisson/log" now causes the following error:

Error in if (correlation) rr@factors$correlation <- if (!is.na(sigm)) as(rr,  :
  argument is of length zero
In addition: Warning message:
In metamisc::valmeta(measure = options[["measure"]], cstat = if (options[["measure"]] ==  :
  The Sidik-Jonkman-Hartung-Knapp correction cannot be applied

while omitting it works fine. I did not immediately see what changed, any ideas?

Cheers,
Frantisek

@NightlordTW NightlordTW added the bug Something isn't working label Nov 1, 2022
@NightlordTW NightlordTW self-assigned this Nov 1, 2022
@NightlordTW
Copy link
Contributor Author

NightlordTW commented Nov 1, 2022

I'm just gonna attach the full reproducible example if it helps (Files: temp_files.zip)

options <- readRDS(options, "options.RDS")
dataset <- readRDS(dataset, "dataset.RDS")

fit <- metamisc::valmeta(
  measure    = options[["measure"]],
  cstat      = if (options[["measure"]] == "cstat" && options[["inputMeasure"]] != "")              dataset[, options[["inputMeasure"]]],
  [cstat.se](https://eur05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcstat.se%2F&data=05%7C01%7CT.Debray%40umcutrecht.nl%7C00f15e6c309f40fbbd0608dabc2ab030%7Cdcdf4a3dd0c04a6394cf781981249be5%7C0%7C0%7C638029189122307954%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=l1gRy43kcQfi1h7w2Q3f3WMqIwEd66xsNgpDuVusZ5c%3D&reserved=0)   = if (options[["measure"]] == "cstat" && options[["inputSE"]] != "")                   dataset[, options[["inputSE"]]],
  cstat.cilb = if (options[["measure"]] == "cstat" && sum(unlist(options[["inputCI"]]) != "") == 2) dataset[, options[["inputCI"]][[1]][1]],
  cstat.ciub = if (options[["measure"]] == "cstat" && sum(unlist(options[["inputCI"]]) != "") == 2) dataset[, options[["inputCI"]][[1]][2]],
  OE         = if (options[["measure"]] == "OE" && options[["inputMeasure"]] != "")                 dataset[, options[["inputMeasure"]]],
  OE.se      = if (options[["measure"]] == "OE" && options[["inputSE"]] != "")                      dataset[, options[["inputSE"]]],
  OE.cilb    = if (options[["measure"]] == "OE" && sum(unlist(options[["inputCI"]]) != "") == 2)    dataset[, options[["inputCI"]][[1]][1]],
  OE.ciub    = if (options[["measure"]] == "OE" && sum(unlist(options[["inputCI"]]) != "") == 2)    dataset[, options[["inputCI"]][[1]][2]],
  N          = if (options[["inputN"]] != "")      dataset[, options[["inputN"]]],
  O          = if (options[["inputO"]] != "")      dataset[, options[["inputO"]]],
  E          = if (options[["inputE"]] != "")      dataset[, options[["inputE"]]],
  slab       = if (options[["inputLabels"]] != "") dataset[, options[["inputLabels"]]],
  method     = "ML",
  pars       = list(
    model.oe    = if (options[["measure"]] == "OE")    options[["linkOE"]],
    model.cstat = if (options[["measure"]] == "cstat") options[["linkCstat"]]
  )
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant