Hello Stata users, long time lurker, first time poster. I am looking for some advice for a scatterplot I am trying to recreate with my own data. I am using the Jacobson and Truax Reliable Change Index to show whether there has been reliable change from pre- to post- intervention, it evaluate if the intervention had a reliable effect.
I have a dataset that has pre-test and post-test scores. I put the pre-test on the x-axis, post-test on the y-axis. I am trying to create a scatterplot with three bisecting lines that show which of the observations in my data are within and outside of a certain range. Essentially, I am trying to re-create the attached image, who did the same thing but with different data.
It is showing a scatterplot of pre-test scores (x-axis) by post-test scores (y-axis), with a bisctor at (0,0) and upper and lower bounds represented by outer lines at +1.96 and -1.96. I am trying to figure out how to adjust diagonal lines such as these on my scatter plot, so that they accurately show +1.96 and -1.96 around the middle bisecting line.
I have used this code to create it so far:
twoway (scatter test_post test_pre, sort mlabel(idno)) || (scatteri 20 20 60 60, connect(l) msymbol(i)) ///
|| (scatteri 25 20 60 55, connect(l) msymbol(i)) || (scatteri 20 25 55 60, connect(l) msymbol(i))
My data is structures like this (example data): 100 observations in total
----------------------- copy starting from the next line -----------------------
The graph looks decent, but it seems like the upper and lower bounds are arbitrary, and as such would not be accurately showing which observations are actually within the range and outside of the range.
Basically, I want to be able to know for sure that the two outer bounds are accurately showing +/- 1.96 around the middle bisector, so that I can easily convey which observations in the dataset have met the threshold for positive or negative change in score.
I greatly appreciate any and all guidance on this. And please let me know if I need to provide any further details.
The image is from this article:
Mata LRFPD, Bernardes MFVG, Azevedo C, Chianca TCM, Pereira MDG, Carvalho EC. Jacobson and Truax Method: evaluation of the clinical effectiveness of a home care program after prostatectomy. Rev Lat Am Enfermagem. 2018;26:e3003. doi: 10.1590/1518-8345.2249.3003. Epub 2018 May 17. Erratum in: Rev Lat Am Enfermagem. 2018 Jul 26;26:e3038. PMID: 29791672; PMCID: PMC5969832.
I have a dataset that has pre-test and post-test scores. I put the pre-test on the x-axis, post-test on the y-axis. I am trying to create a scatterplot with three bisecting lines that show which of the observations in my data are within and outside of a certain range. Essentially, I am trying to re-create the attached image, who did the same thing but with different data.
It is showing a scatterplot of pre-test scores (x-axis) by post-test scores (y-axis), with a bisctor at (0,0) and upper and lower bounds represented by outer lines at +1.96 and -1.96. I am trying to figure out how to adjust diagonal lines such as these on my scatter plot, so that they accurately show +1.96 and -1.96 around the middle bisecting line.
I have used this code to create it so far:
twoway (scatter test_post test_pre, sort mlabel(idno)) || (scatteri 20 20 60 60, connect(l) msymbol(i)) ///
|| (scatteri 25 20 60 55, connect(l) msymbol(i)) || (scatteri 20 25 55 60, connect(l) msymbol(i))
My data is structures like this (example data): 100 observations in total
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(test_post test_pre) 54 33 51 37 44 43 49 35 47 32 48 33 36 28 44 46 end
The graph looks decent, but it seems like the upper and lower bounds are arbitrary, and as such would not be accurately showing which observations are actually within the range and outside of the range.
Basically, I want to be able to know for sure that the two outer bounds are accurately showing +/- 1.96 around the middle bisector, so that I can easily convey which observations in the dataset have met the threshold for positive or negative change in score.
I greatly appreciate any and all guidance on this. And please let me know if I need to provide any further details.
The image is from this article:
Mata LRFPD, Bernardes MFVG, Azevedo C, Chianca TCM, Pereira MDG, Carvalho EC. Jacobson and Truax Method: evaluation of the clinical effectiveness of a home care program after prostatectomy. Rev Lat Am Enfermagem. 2018;26:e3003. doi: 10.1590/1518-8345.2249.3003. Epub 2018 May 17. Erratum in: Rev Lat Am Enfermagem. 2018 Jul 26;26:e3038. PMID: 29791672; PMCID: PMC5969832.