gertvv / gemtc

GeMTC R package: model generation for network meta-analysis
GNU General Public License v3.0
43 stars 25 forks source link

An error can't be found on Google #61

Closed Kingsman-Key closed 3 years ago

Kingsman-Key commented 3 years ago

Hi, gertvv! I've come across an error that couldn't be found on google. Here is my code Error in validate.data.normal.identity(list(study = c(1L, 1L, 2L, 2L, : all(data.ab[["std.err"]] > 0) is not TRUE I've checked the value of the std. dev column. All of them are positive. I'm just confused. I'd be grateful if you could just give me some advice. Hope to hear from you soon.

Kingsman-Key commented 3 years ago

model <-mtc.model(network) This is the code that causes the problem

gertvv commented 3 years ago

Hi! It's hard to tell what's going on without seeing the data.

The "std.err" is calculated from the "std.dev" and "sampleSize" if it's not explicitly specified. Are the "sampleSize" also all positive? If so you might want to check the data are "numeric" and not something else like character of factor data.

Kingsman-Key commented 3 years ago

I guess I found where the problem lies. Some of my samples have std.err and mean that are zero. That is why when i tried to rule out the result that are negative, it kept telling me the error. Thanks for your help!!