Page 1 of 1

How to go about accessing actual data from plots

Posted: Tue Oct 16, 2018 8:04 am
by civean
Hello,

I really like the output quality and ease of use of jamovi - finally something I can recommend to students and coworkers less inclined to programming! However, I am trying to figure out some small details that are necessary for using jamovi for actual analysis - I'm sure this can be done in R, but I'm trying to stay "within" jamovi which I think is essential for this audience.

The problem I'm having is actually accessing the exact plotted data in results figures, let's say in the ROC curve for binomial regression. I'm used to python, where I would have new data variables produced as returns from an analysis function, which can be inspected to extract/inspect actual data values. I can't seem to figure this out within jamovi, even when using the Rj environment. Any idea how I would go about it?

Best,
C

Re: How to go about accessing actual data from plots

Posted: Tue Oct 16, 2018 9:03 am
by jonathon
oh yup,

so first you need to navigate the results hierarchy, extract the image, and then access the image's state.

you can run this in the Rj editor (or R) with the Tooth Growth data set.

Code: Select all

results <- jmv::logRegBin(
    data = data,
    dep = "supp",
    covs = c("dose", "len"),
    blocks = list(
        list(
            "dose",
            "len")),
    refLevels = list(
        list(
            var="supp",
            ref="OJ")),
    rocPlot = TRUE)

image <- results$models[[1]]$pred$rocPlot

image$state
cheers

Re: How to go about accessing actual data from plots

Posted: Tue Oct 16, 2018 1:15 pm
by civean
Ah, I see! Thank you, works perfect :)

Would it make sense to have "Copy/save image state" (as option to save image) in the right-click menu for images, to make it more discoverable?

Best,
C

Re: How to go about accessing actual data from plots

Posted: Tue Oct 16, 2018 9:40 pm
by jonathon
yeah, that's a good suggestion. we definitely need to do something here.

cheers