ACCLAB / dabestr

Data Analysis with Bootstrap Estimation in R
https://acclab.github.io/dabestr
Apache License 2.0
214 stars 34 forks source link

Issue with effsize.y axis #30

Open coynie opened 5 years ago

coynie commented 5 years ago

Hi

I am having issues with the effsize.y axis. For some reason the mean and 95%CI is not aligning to the swarm plot. Please see attached screenshot and code. I have 5 other dabestr plots that I have created with other variables and they are all fine so I am unsure what is happening here. Have tried restarting R, clearing plots and environment and restarting computer.

changeACWR_est <- dabest(wlSNs_nobeta, group1, change_raACWR, idx=c("s", "ns")) changeACWR_est_plot <- plot(changeACWR_est, rawplot.ylabel = "Change21 ACWR", effsize.ylabel = "")

Any advice would be much appreciated. Thanks in advance.

Screen Shot 2019-04-10 at 3 27 10 pm
josesho commented 5 years ago

Hi @coynie , could you provide a minimally reproducible example? This would help me in trying to debug the issue.

Thanks!

coynie commented 5 years ago

Sure try this. I'm using couplet's plot grid() to put all the plots together but the issue also appears when calling the single plot. Thanks!

`#load required packages library(tidyverse) library(dabestr) library(cowplot)

data for analysis

wlSNs_nobeta <- structure(list(id = c(8, 9, 10, 11, 12, 13, 14, 15, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28), abs_raA = c(117.142857142857, 98.5714285714286, 112.857142857143, 215.714285714286, 377.142857142857, 185.714285714286, 77.1428571428571, 84.2857142857143, 60, 128.571428571429, 168.333333333333, 175, 72.1428571428571, 145.714285714286, 105.714285714286, 288.571428571429, 51.4285714285714, 364.285714285714), abs_raC = c(308.095238095238, 197.142857142857, 170, 424.761904761905, 368.571428571429, 291.904761904762, 312.857142857143, 101.904761904762, 159.52380952381, 212.380952380952, 376, 316.5, 155, 241.428571428571, 198.095238095238, 358.333333333333, 108.571428571429, 420), abs_raCA = c(190.952380952381, 98.5714285714286, 57.1428571428571, 209.047619047619, -8.57142857142861, 106.190476190476, 235.714285714286, 17.6190476190476, 99.5238095238095, 83.8095238095238, 207.666666666667, 141.5, 82.8571428571429, 95.7142857142857, 92.3809523809524, 69.7619047619048, 57.1428571428571, 55.7142857142857 ), abs_raACWR = c(0.380216383307573, 0.5, 0.663865546218487, 0.507847533632287, 1.02325581395349, 0.636215334420881, 0.246575342465753, 0.827102803738318, 0.376119402985075, 0.605381165919283, 0.447695035460993, 0.552922590837283, 0.465437788018433, 0.603550295857988, 0.533653846153846, 0.80531561461794, 0.473684210526316, 0.86734693877551), change_raA = c(-288.571428571429, -201.428571428571, -270, -567.142857142857, -60, -118.571428571429, -298.571428571429, 21.4285714285714, -212.857142857143, -180, -298.095238095238, -199.285714285714, -193.571428571429, -91.4285714285714, -271.428571428571, -118.571428571429, -214.285714285714, 80), change_raC = c(-95.2380952380952, -51.9047619047619, -112.857142857143, -104.52380952381, 25.7142857142857, -15.2380952380952, -160.952380952381, -78.5714285714286, -187.619047619048, -125, -83.7619047619048, -52.0714285714286, -83.5714285714286, -38.0952380952381, -271.904761904762, -45.952380952381, -127.142857142857, 18.0952380952381 ), change_raCA = c(193.333333333333, 149.52380952381, 157.142857142857, 462.619047619048, 85.7142857142857, 103.333333333333, 137.619047619048, -100, 25.2380952380952, 54.9999999999999, 214.333333333333, 147.214285714286, 110, 53.3333333333333, -0.476190476190439, 72.6190476190476, 87.1428571428571, -61.9047619047619), change_raACWR = c(-0.625686804413796, -0.704588910133843, -0.689669807316866, -0.971234787555297, -0.251744186046512, -0.354482339997724, -0.54638948165485, 0.478817843316154, -0.4098888274676, -0.309227161533081, -0.566805223472202, -0.462581285131709, -0.648334667071387, -0.244831305504874, -0.268777764788403, -0.201751523191247, -0.653588516746411, 0.160000967211529), vol_raA = c(134.400009255403, 54.690755317523, 81.8029940453958, 228.796084324313, 52.1116764473897, 52.17048005635, 114.791863873978, 29.1042160792213, 75.3007252458179, 69.6089312098585, 158.892986495762, 55.996537793849, 60.2162849386883, 56.2372974535452, 89.7174053792704, 41.6757521678502, 54.3074607355673, 83.5213234296735), vol_raC = c(39.2969612156178, 22.5100008967927, 30.3345454109121, 59.7468903635099, 20.3757225154646, 9.31105907969749, 59.6666675715245, 39.2989807875536, 57.4372542068637, 46.8911717595761, 54.6856681207061, 17.7416134330766, 24.929790192568, 12.4435015145565, 89.8737972253737, 28.4832255319214, 34.8864602927696, 24.6249044555942 ), vol_raCA = c(97.6690486403154, 38.4977179847517, 63.2065120705485, 204.750336513382, 53.7078987373672, 46.3583456339043, 69.9798974636487, 65.5017101370811, 26.8764575294767, 29.8834253794117, 106.722245198119, 39.8097886075452, 37.8517445059315, 51.7648471002637, 19.8142764227355, 26.9382580002514, 27.9062013512788, 76.8923734958472), vol_raACWR = c(0.28429919291267, 0.171475792832436, 0.244322639207408, 0.373651133819046, 0.145425433431645, 0.155955657305554, 0.215185142559467, 0.431139025365937, 0.176125761252924, 0.126149217953567, 0.259407332307541, 0.122717923733346, 0.201250420355636, 0.19919646372914, 0.092689253646399, 0.0672587677321364, 0.168539028726557, 0.192878218038433), abs_ewma1A = c(119.000513795851, 106.643368888931, 111.387428539078, 221.144496813386, 331.567343001678, 160.587893859214, 99.4100466130151, 72.836148777051, 81.6535945857512, 120.177325421192, 124.863369007239, 155.523648087284, 68.8930722842997, 140.583503512754, 80.3738608682444, 201.884482756256, 52.9528674472491, 344.826336948895), abs_ewma1C = c(236.254644679062, 171.464595099452, 160.966248540278, 346.807174449879, 364.692626725041, 240.57877338261, 249.739004607213, 106.537786969847, 143.340274138407, 187.80021906227, 263.03773343222, 269.347489800666, 131.593427322217, 203.508843222624, 181.082468613815, 318.431863584711, 108.695947361405, 399.1155344357 ), abs_ewma1CA = c(117.254130883211, 64.8212262105204, 49.5788200011999, 125.662677636493, 33.1252837233632, 79.990879523396, 150.328957994198, 33.7016381927958, 61.6866795526559, 67.6228936410777, 138.17436442498, 113.823841713382, 62.7003550379175, 62.9253397098706, 100.70860774557, 116.547380828455, 55.7430799141559, 54.2891974868048), abs_ewma1ACWR = c(0.503695975829411, 0.621955621958438, 0.691992449033227, 0.6376583678356, 0.90916930780633, 0.667506495279279, 0.398055749318639, 0.683664930994537, 0.569648656503251, 0.639921114156658, 0.474697555282176, 0.577408938180124, 0.523529736144111, 0.690798008020543, 0.443852248555621, 0.633995858591424, 0.487165057508402, 0.863976235443797), change_ewma1A = c(-247.479397574522, -125.167514727307, -335.116905625623, -619.607631419535, -193.409486690768, -162.476517568277, -335.985522275293, -16.3380132047176, -142.139422314612, -160.110506645666, -380.843476101779, -155.693177478515, -223.513427328224, -136.188957934618, -296.295982747113, -281.400361905739, -174.986071577384, 86.615804004321), change_ewma1C = c(-116.573017168172, -46.9713592153722, -143.105905458055, -241.996771980647, -13.8303401133433, -50.2130049197111, -199.516425167813, -37.2557511659476, -115.119654316466, -114.763856232343, -173.889154977408, -68.1105112142749, -112.847740234337, -28.4048913522242, -227.175750781799, -82.0837454936471, -113.96748014844, 93.3714663554437), change_ewma1CA = c(130.906380406349, 78.1961555119344, 192.011000167567, 377.610859438888, 179.579146577424, 112.263512648566, 136.469097107481, -20.9177379612299, 27.0197679981468, 45.346650413323, 206.954321124371, 87.58266626424, 110.665687093886, 107.784066582394, 69.1202319653141, 199.316616412092, 61.0185914289439, 6.75566235112274), change_ewma1ACWR = c(-0.534997842709821, -0.439274816699738, -0.776423281554021, -0.790239888162458, -0.477739481579207, -0.443475435893539, -0.571093514177948, 0.0635107631656937, -0.296222576373137, -0.286454007522729, -0.682719986471191, -0.344829754130568, -0.67269470728918, -0.502630496568715, -0.478774230766657, -0.572660845186241, -0.536527704135424, 0.0194446160215185), vol_ewma1A = c(133.058943289248, 58.154376791002, 80.0022899860389, 212.773616734812, 62.2977569777029, 62.5272202473118, 125.880561244335, 24.293102991733, 74.2126805049861, 72.4987165719818, 161.916803259578, 69.3971879944651, 61.2987495871907, 62.9597383731531, 93.9933335554993, 78.6035209207713, 50.4804137523572, 95.8782703975514), vol_ewma1C = c(60.4288474357636, 24.388559079803, 37.4089616754015, 94.3846758176754, 25.5653635138887, 23.6340854545295, 64.9306148275604, 9.80860196770636, 45.7234291416375, 43.8366127829923, 76.2975300783642, 28.0936907267791, 33.2550918223923, 26.2677802163546, 71.5813431589987, 28.1715656161128, 33.8729621637774, 51.0993014129225 ), vol_ewma1CA = c(77.1454818672372, 35.8493241401187, 45.9609658264543, 129.249914970496, 43.0094060720612, 41.2228517805564, 62.5939951062421, 21.9830139196358, 30.3658353689791, 31.5750544615464, 91.4483272128544, 42.0565280424247, 29.4425296918994, 43.1850605707931, 26.876612659395, 53.3687516047934, 18.4316074100456, 56.6895426827224), vol_ewma1ACWR = c(0.242492105948462, 0.170430303448065, 0.187631910235743, 0.250022163148667, 0.113554041340076, 0.146197862587291, 0.211796915409643, 0.169442352520555, 0.179875896539722, 0.132612179620373, 0.24082518417007, 0.136728182832202, 0.172003262084573, 0.178104515964331, 0.142171539758038, 0.142711407051194, 0.144138813733478, 0.135696948703938), abs_ewma2A = c(183.918560064379, 145.316223039074, 138.263888252649, 287.874401929521, 362.341652014512, 210.088238871599, 181.839209611985, 94.5225575268521, 110.914679311641, 155.20582192806, 200.452696056051, 226.561702973587, 103.090922444334, 179.808512534344, 130.399314875075, 278.376752962211, 82.1927558295064, 389.891222685059 ), abs_ewma2C = c(264.478261800536, 175.463960750135, 168.408379962856, 367.934442127866, 326.151827721931, 249.26898853511, 304.60138980156, 110.044141167933, 168.513637455178, 212.444710060945, 299.740057372783, 288.52740139959, 151.622763873964, 201.237797909154, 233.867232870284, 316.960043351866, 131.829932971608, 363.184762572632), abs_ewma2CA = c(80.5597017361575, 30.147737711061, 30.1444917102073, 80.0600401983447, -36.1898242925814, 39.1807496635109, 122.762180189576, 15.5215836410814, 57.5989581435376, 57.2388881328847, 99.2873613167322, 61.9656984260027, 48.5318414296308, 21.4292853748094, 103.467917995209, 38.5832903896554, 49.6371771421013, -26.7064601124274), abs_ewma2ACWR = c(0.695401424723088, 0.828182735747131, 0.821003612071704, 0.782406779492196, 1.1109600536209, 0.842817392192401, 0.596974326776539, 0.85895129466825, 0.658194084387634, 0.730570424104867, 0.668755113390635, 0.785234615064568, 0.679917182686548, 0.893512622392721, 0.557578388706559, 0.878270806687066, 0.623475670333598, 1.07353408750756), change_ewma2A = c(-188.000572544508, -94.6226948922742, -229.298043683799, -418.99468462549, -83.7365303248213, -95.7725933788113, -270.166750080467, -40.0820691450345, -147.823679067487, -149.727917432235, -275.96458738209, -112.025151782666, -163.736804971735, -77.4121643981451, -276.491105899767, -171.036917612525, -150.80131952528, 87.6574442040162), change_ewma2C = c(-15.1298155305186, 13.9508762820792, -43.0710704494082, -43.56604601394, 55.4030645311743, 7.69796429391823, -81.4087723040039, -9.40538004332096, -41.7831354990953, -42.02682856784, -37.6566517221904, -2.41391140889039, -41.5799021424581, 26.8625634063856, -115.852250689044, 20.3759672019833, -50.9787633626888, 110.157539240527), change_ewma2CA = c(172.870757013989, 108.573571174353, 186.226973234391, 375.42863861155, 139.139594855996, 103.47055767273, 188.757977776463, 30.6766891017135, 106.040543568392, 107.701088864395, 238.3079356599, 109.611240373775, 122.156902829277, 104.274727804531, 160.638855210723, 191.412884814509, 99.8225561625915, 22.5000950365105 ), change_ewma2ACWR = c(-0.634743026606677, -0.657386800130337, -0.917046733812549, -0.935377541364842, -0.536612319683156, -0.423314724484928, -0.57399474105033, -0.26792326545518, -0.572154602110695, -0.467731519615144, -0.743283802804114, -0.378528796490313, -0.701159657078116, -0.581586050110605, -0.605898168657781, -0.637028586351214, -0.651048354107328, -0.120937299803811), vol_ewma2A = c(91.9588815840292, 40.3889973556659, 58.7031932372458, 151.729907666619, 35.5185765807231, 38.1794122199367, 90.7060688363441, 13.2144033744877, 61.2996027191368, 58.7724764068333, 115.597176887869, 43.6703483719149, 47.000566130851, 39.6063463849827, 86.5775660333691, 46.7945288566893, 43.9439765525937, 64.9267667721921 ), vol_ewma2C = c(27.3896345921318, 12.190312739752, 10.8210057549351, 33.2054696138874, 28.214398546402, 13.6255152657358, 30.2000394227757, 4.2493925930861, 19.9843949810855, 18.7532851476218, 30.9551909492202, 15.5759988448038, 13.4632676578819, 20.3572012564723, 37.3367368630928, 23.1119297729738, 15.6842926104954, 44.1529912478655), vol_ewma2CA = c(72.797721992427, 39.0432587430069, 48.9816314175276, 129.128658513725, 31.4404883631809, 34.0948100828694, 62.1521421762724, 9.15903819874985, 42.7990028743541, 41.2571869728855, 91.8596997717577, 35.6112233031997, 34.9199698346061, 35.5389201374803, 50.2181685846357, 47.793724733221, 28.8803401893618, 32.7914500440276), vol_ewma2ACWR = c(0.236116019346408, 0.214246094117512, 0.243540782254956, 0.299051175368149, 0.123183014043921, 0.130683044094494, 0.179752325510558, 0.0787023792160263, 0.214621895529561, 0.165285357463659, 0.255045062275643, 0.11530832512659, 0.194289221069225, 0.176818437082674, 0.179778338641324, 0.154943630723732, 0.181602058178967, 0.0864283357820412), abs_strain = c(0.511624724594905, 0.994996841658075, 1.25990774607263, 1.69506063680318, 1.29697240783637, 1.39741867551076, 0.764184950247154, 0.850175866113747, 1.40129809949074, 1.32510649335428, 1.59225995946228, 0.862267768891004, 1.01531042371759, 1.10059838295304, 0.98886659507597, 0.775364737520656, 0.952661023244934, 1.30078340653854), abs_mono = c(419.532274167822, 686.547820744072, 995.327119397379, 2559.54156157281, 3424.00715668802, 1816.64427816399, 412.659873133463, 501.60376100711, 588.545201786111, 1192.59584401885, 1608.1825590569, 905.381157335554, 512.731763977381, 1122.6103506121, 731.761280356218, 1566.23676979173, 342.957968368176, 3316.99768667326), change_strain = c(-1.10999736698528, -0.39621984562243, -0.0104817580762235, -0.18843453838751, -0.37869001293898, 0.0437478983708457, -0.869428950673985, -0.444501883826553, -0.0729132754098638, 0.358051099170145, 0.414966526317288, -1.15198489235101, -0.424417536845587, -0.909100593161162, -0.202035447545743, -0.769121974221751, -0.360752885519826, -0.334323770175296), change_mono = c(-4185.8744659199, -2235.00722254499, -2409.31675172155, -7762.0119984722, -1703.51985088455, -1066.67447714403, -3883.74468628913, -68.0544489666212, -2227.19852427404, -896.243807418881, -2235.68050016149, -4371.96081511852, -2165.16224267012, -2213.48994973748, -2412.2201121651, -2835.55035867414, -2099.99190193428, 63.1344050127409 ), mean_strain = c(1.13412228876208, 1.49497808625493, 1.15429109715176, 1.60326658292368, 1.54470490693682, 1.61892543027148, 1.38253058775848, 1.35411560994399, 1.39945225046909, 1.26553641440904, 1.24798656167442, 1.75790781276539, 1.5025664464122, 1.6108887263159, 1.21263893160127, 1.35062809319368, 1.34258148984896, 1.41025386531569), mean_mono = c(3048.22250604434, 2459.2726656218, 1719.06076210491, 5772.58813124984, 4240.70963346739, 3518.79534807063, 3639.60137244606, 972.012259299196, 1890.705860162, 2050.14883234255, 3395.44461984326, 4409.41285323894, 1916.59787912395, 2983.34692677836, 2088.77161757183, 3903.0625690138, 1332.57561844879, 4098.10619089067), group1 = c("ns", "ns", "ns", "ns", "ns", "ns", "ns", "ns", "s", "s", "s", "s", "s", "s", "s", "s", "s", "s"), group2 = c("bot5", "bot5", "bot5", "bot5", "bot5", "na", "na", "na", "na", "na", "na", "na", "na", "top5", "top5", "top5", "top5", "top5"), pb = c(0.933099, 0.945946, 0.95122, 0.961538, 0.965368, 0.96962, 0.976798, 0.983333, 0.997167, 1, 1, 1.006289, 1.006711, 1.0131, 1.018041, 1.029412, 1.02973, 1.051793), wr = c(0.960144927536232, 0.921052631578947, 0.898617511520737, 0.921658986175115, 0.957081545064378, 0.928484848484848, 0.891005291005291, 0.986072423398329, 0.98050139275766, 0.926773455377574, 0.94047619047619, 0.960960960960961, 0.983606557377049, 0.995708154506438, 1.00253807106599, 0.967741935483871, 1.00263157894737, 1.00763358778626 ), inj42 = c(0.0238095238095238, 1, 0, 0.880952380952381, 0, 0.928571428571429, 0.857142857142857, 0, 1, 1, 0, 0, 0, 0, 0.261904761904762, 0.0714285714285714, 0.476190476190476, 0), inj14 = c(0, 1, 0, 0.785714285714286, 0, 0.785714285714286, 0.571428571428571, 0, 1, 1, 0, 0, 0, 0, 0.785714285714286, 0, 0.0714285714285714, 0)), row.names = c(NA, -18L), class = c("tbl_df", "tbl", "data.frame"))

Cumming estimation plots for differences in rolling average C-A and ACWR

absCA_est <- dabest(wlSNs_nobeta, group1, abs_raCA, idx=c("s", "ns")) changeCA_est <- dabest(wlSNs_nobeta, group1, change_raCA, idx=c("s", "ns")) volCA_est <- dabest(wlSNs_nobeta, group1, vol_raCA, idx=c("s", "ns"))

absCA_est_plot <- plot(absCA_est, rawplot.ylabel = "Absolute C-A", effsize.ylabel = "") changeCA_est_plot <- plot(changeCA_est, rawplot.ylabel = "Change21 C-A", effsize.ylabel = "") volCA_est_plot <- plot(volCA_est, rawplot.ylabel = "Vol21 C-A", effsize.ylabel = "") plot_grid(absCA_est_plot, changeCA_est_plot, volCA_est_plot, nrow=1, labels = "auto")

absACWR_est <- dabest(wlSNs_nobeta, group1, abs_raACWR, idx=c("s", "ns")) changeACWR_est <- dabest(wlSNs_nobeta, group1, change_raACWR, idx=c("s", "ns")) volACWR_est <- dabest(wlSNs_nobeta, group1, vol_raACWR, idx=c("s", "ns"))

absACWR_est_plot <- plot(absACWR_est, rawplot.ylabel = "Absolute ACWR", effsize.ylabel = "") changeACWR_est_plot <- plot(changeACWR_est, rawplot.ylabel = "Change21 ACWR", effsize.ylabel = "") volACWR_est_plot <- plot(volACWR_est, rawplot.ylabel = "Vol21 ACWR", effsize.ylabel = "") plot_grid(absACWR_est_plot, changeACWR_est_plot, volACWR_est_plot, nrow=1, labels = "auto")`

coynie commented 5 years ago

Hi

Was this resolved in an update?

Best,

Joseph Coyne

m | 0411 529 390 a | 18 Bondi Pl, Salt, Kingscliff NSW 2487

On 6 Sep 2019, at 12:01 pm, Joses W. Ho notifications@github.com wrote:

Closed #30 https://github.com/ACCLAB/dabestr/issues/30.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ACCLAB/dabestr/issues/30?email_source=notifications&email_token=ALZNQIFHEXXETUR3T67JLBLQIHI2TA5CNFSM4HEZTHH2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTPAI7UY#event-2613088211, or mute the thread https://github.com/notifications/unsubscribe-auth/ALZNQIAAI42Q4MMI5BAZFUDQIHI2TANCNFSM4HEZTHHQ.

josesho commented 5 years ago

Hi sorry, this issue has not been resolved yet. It is very curious that only the change_raACWR column in your dataset produces a misaligned plot....

coynie commented 5 years ago

Ok understood. Any reason why you think?

Best,

Joseph Coyne

m | 0411 529 390 a | 18 Bondi Pl, Salt, Kingscliff NSW 2487

On 17 Sep 2019, at 11:27 am, Joses W. Ho notifications@github.com wrote:

Hi sorry, this issue has not been resolved yet. It is very curious that only the change_raACWR column in your dataset produces a misaligned plot....

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ACCLAB/dabestr/issues/30?email_source=notifications&email_token=ALZNQIH5C6UR4XLIPXRBC73QKBFAZA5CNFSM4HEZTHH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD63FIHA#issuecomment-532042780, or mute the thread https://github.com/notifications/unsubscribe-auth/ALZNQIHSDYQLZVZB5GN4EC3QKBFAZANCNFSM4HEZTHHQ.

mick42-star commented 4 years ago

Hi I met the sample problem with v0.2.5. I wonder whether this problem been solved

faustovrz commented 4 years ago

I think the misalignment problem is due to differences of negative values. I ran on the same issue with a dataset like this:

library(dplyr)
library(dabestr)

flowering <- data.frame(
  genotype = c(rep("wt", 300), rep("mutant", 100)), 
  anthesis = c(50 + rbinom(300, 7, 1/20), 50 + rbinom(100, 7, 1/5)), 
  silking  = c(50 + rbinom(300, 7, 1/4),  50 + rbinom(100, 7, 3/5))
) %>%
  dplyr::mutate(ASI = anthesis - silking,
                SAI = silking - anthesis) 

unpaired_mean_diff <-  flowering %>%
  dabestr::dabest(genotype, ASI,
                  idx = c("wt", "mutant"),
                  paired = FALSE) %>% 
  dabestr::mean_diff()

unpaired_mean_diff 

plot(unpaired_mean_diff)
Screen Shot 2020-10-05 at 12 19 22 PM

It disappears when I use the positive quantities:

unpaired_mean_diff <-  flowering %>%
  dabestr::dabest(genotype, SAI,
                  idx = c("wt", "mutant"),
                  paired = FALSE) %>% 
  dabestr::mean_diff()

unpaired_mean_diff 

plot(unpaired_mean_diff)
Screen Shot 2020-10-05 at 12 32 58 PM
josesho commented 4 years ago

Hi @faustovrz, thanks for this key bit of debugging! I'll see how to mitigate this.

faustovrz commented 4 years ago

Hi @josesho, you are welcome, these plots are neat, except for this bug. Any update on this issue?

josesho commented 4 years ago

@faustovrz apologies for the delay, will aim to update by end of next week!

roey-angel commented 2 years ago

Hi, any progress with fixing this bug? My current workaround is either to recreate the plot using ggplot from mean_diff() output or add a large positive value before computing mean_diff() and then subtract it manually from the plots using a vector manipulation software

SamRPJRoss commented 2 years ago

Hi all, anyone found a solution to this? I'm using 0.3.0 and encountered the same issue with negative numbers. I have a variable whose sign is important, and thus should be conserved. Would be great to know how to fix this.

@roey-angel how did you find reproducing the plot in ggplot. Was it successful? Cheers!

roey-angel commented 2 years ago

@SamRPJRoss Sorry I cannot find my ggplot code right now. I mostly use my trick to convert values to positive and then subtract them in Inkscape. That's a real shame that such an important package isn't maintained.