FBartos / zcurve

zcurve R package for assessing the reliability and trustworthiness of published literature with the z-curve method
https://fbartos.github.io/zcurve
10 stars 1 forks source link

zcurve() not working #12

Closed cbh2132 closed 10 months ago

cbh2132 commented 1 year ago

I've tried using a data frame column of 67 separate numeric values (z scores) and it throws the following error.

OUTPUT: Error in zcurve(df$z_score) : There must be at least 10 z-scores in the fitting range but a much larger number is recommended.

Additionally trying to use sample data provided throws an error the first time I run it and then stalls out if I run it again.

OUTPUT:

fit <- zcurve(OSC.z) Error in .zcurve_EM_start_fast_RCpp(x = z, K = control$K, mu = control$mu, : function 'Rcpp_precious_remove' not provided by package 'Rcpp'

Z-CURVE ANALYSIS

library(zcurve) fit <- zcurve(OSC.z) --- Rstudio stalls out after this.

FBartos commented 1 year ago

Hi,

The first error message indicates that you have too few z-scores in the range from 1.96 to 6. The estimation algorithm uses only statistically significant z-scores to estimate the mixture model (z-scores larger than 6 are treated separately and combined with the remaining data later). You can check that with sum(df$z_score > 1.96 & df$z_score < 6) or visually check with a histogram.

The sample data bug looks like nothing I encountered so far. I just tested and I could run the examples with the newest version of the package and Rcpp. Could you please attach the printed output of utils::sessionInfo() ?

Cheers, Frantisek