Closed nessielovessweattea closed 4 years ago
Your initial example shows that the format of the output to qdata() was changed. This happened at mosaic 1.6, as you can see from the change log at https://projectmosaic.github.io/mosaic/news/index.html or from thew NEWS file in the package. So if you want consistent behavior with your professor, you both need to have versions on the same side of that change.
Note also that the older version is not providing a "p-value", it is providing two columns, one labeled 'p' and the other labeled 'value'. In the new format, values of p are stored in the names of the vector (just as they are when you use quantile()
. These values are only p-values if the data being used are an appropriate (simulated) null distribution for the test being conducted and the correct tail or tails are used.
For sharing code, I encourage you to provide fully reproducible code, properly formatted, rather than screen shots. (Using the reprex package is a good way to do this.)
To fix your problem you can use something like
favstats( ~ X98., data = Bootstrap_trials)
(but I would not use bootstrapping for sampling distribution of 98% quantiles)
I'm sorry about using bootstrapping for sampling distribution of 98% quantiles, that was the example from "Modern Data Science with R" by Benjamin Baumer, page 157 unless I messed up on that. It was last updated in 2015, so the information is very hit or miss to replication or reproducing.
Tiffany, sorry for the issues. Please let me know if I can help with your efforts to replicate.
My professor and I have been working on this for hours and she is able to get my code to work, but hasn't updated her packages in a few years... I cannot get her code to work but sharing the screen we can see that we're getting different layouts on the same code.
I have mosaic 1.7.0, I dont know what version she has because I thought it was a devtools issue... She had rstudio version 0.0.8 I believe and hasn't updated.
when I run anything with qdata()(see line 103-105 of file), i get 98% 108.38
and not what she gets p value .98 108.38
so for favstats()(line 113) I get an error because line 112, head() shows columns (unlabeled) n and (labeled)X98.... instead of p and value