Hello all~!
I'm a new researcher and was hoping someone experienced with graphs could offer some advice. I'm trying to copy the following graph: https://postimg.org/image/ovuzkbhdp/ e_GFR_graph.jpg But in excel each series must be modified individually! (line thickness, pattern, color, etc) I have over 300 series and it'd be horribly difficult to modify each series one-by-one. Similar to the graph, I'd also like to superimpose the median and 95%CIs of 2 groups on my graph. Any help would be fantastically appreciated! Sincerely, Trent |
Administrator
|
Trent posted this question to ResearchGate a week or two ago, and I suggested he might have better luck here, because I thought Andy or ViAnn would be all over it! Any ideas you two, or anyone else?
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Many of the properties of the objects in the graph can be set in GPL code, but the easiest way to get the desired look is first to create one basic graph via the Chart Builder. Then open it in the Chart Editor and set the display properties such as color, line thickness, etc as desired. Then save it as a template (File > Save Chart Template) selecting the appropriate properties. Then for producing similar charts, use this template from the Chart Builder (paste the syntax), and those properties will be applied to the new charts. On Thu, Sep 8, 2016 at 7:48 PM, Bruce Weaver <[hidden email]> wrote: Trent posted this question to ResearchGate a week or two ago, and I suggested |
In reply to this post by Bruce Weaver
Well geez, others can answer graph questions if they want :) Here is an example, I wrote a blog post about a similar topic recently, https://andrewpwheeler.wordpress.com/2016/08/12/plotting-panel-data-with-many-lines-in-spss/.
******************************************************************************************. SET SEED 10. INPUT PROGRAM. LOOP #i = 1 TO 300. COMPUTE #G = RV.BERNOULLI(0.5). LOOP #M = 1 TO 36. COMPUTE Group = #G. COMPUTE Month = #M. COMPUTE IndividualId = #i. END CASE. END LOOP. END LOOP. END FILE. END INPUT PROGRAM. DATASET NAME Lines. DO IF Group = 1. COMPUTE Y = 40 + 0.5*Month + 0.1*(Month**2) + RV.NORMAL(0,4). ELSE. COMPUTE Y = 30 + 2*Month - 0.04*(Month**2) + RV.NORMAL(0,10). END IF. EXECUTE. FORMATS Group (F1.0) Month (F2.0) Y (F3.0) IndividualId (F3.0). VALUE LABELS Group 0 'A' 1 'B'. *Now the graph. GGRAPH /GRAPHDATASET DATASET=Lines NAME="Aggre" VARIABLES=Month Group MEDIANCI(Y,95)[NAME="MedianY" HIGH="HighCI" LOW="LowCI"] /GRAPHDATASET DATASET=Lines NAME="Micro" VARIABLES=Month Y IndividualId Group /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: M=userSource(id("Micro")) DATA: Month=col(source(M), name("Month")) DATA: Y=col(source(M), name("Y")) DATA: IndividualId=col(source(M), name("IndividualId"), unit.category()) DATA: Group=col(source(M), name("Group"), unit.category()) SOURCE: A=userSource(id("Aggre")) DATA: MonthA=col(source(A), name("Month")) DATA: GroupA=col(source(A), name("Group"), unit.category()) DATA: MedianY=col(source(A), name("MedianY")) DATA: LowCI=col(source(A), name("LowCI")) DATA: HighCI=col(source(A), name("HighCI")) GUIDE: axis(dim(1), label("Month")) GUIDE: axis(dim(2), label("Y")) GUIDE: axis(dim(3), opposite()) ELEMENT: line(position(Month*Y), split(IndividualId), transparency(transparency."0.9"), color(Group)) ELEMENT: line(position(MonthA*MedianY), color(GroupA), shape(shape.dash)) ELEMENT: line(position(MonthA*HighCI), color(GroupA)) ELEMENT: line(position(MonthA*LowCI), color(GroupA)) END GPL. ******************************************************************************************. I would actually suggest putting each group in its own panel, as real life data won't be so separated. But I am getting error messages when I do that with this data, https://dl.dropboxusercontent.com/u/3385251/Median_Lines.sps. There would be workarounds not using a second GRAPHDATASET line. Note that the median are per X axis category, it is not a median for the entire curve (what you would need a model for). |
Administrator
|
Yeah, sure. And people can choose ground chuck over prime rib too. ;-)
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Administrator
|
Can I get a surf & turf. LOBSTER!
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by Andy W
Thank you so very much Dr.s Weaver, Peck, and Andy W!
I was beginning to think that making such a graph would require Stata or R.. I'll try your suggestions and post back here on how it goes~~ :) |
And Andy is a Dr too, now. On Sat, Sep 10, 2016 at 6:20 AM, Trenton Lum <[hidden email]> wrote: Thank you so very much Dr.s Weaver, Peck, and Andy W! |
They're not real doctors, they're Ph.D.s
-- a Ph.D. has
to have been involved in
psychiatric or medical research
with MD PIs to get the joke.
Here's another "joke":
"Ph.D.s are great! Every MD should own
at least one!"
I've been involved in too much psychiatric
research.
-Mike Palij, Ph.D.
New York University
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
That's why they call the degree a doctorate. Equally logically, a cyclist riding clipless pedals clips in to them. On Sat, Sep 10, 2016 at 7:26 AM, Mike Palij <[hidden email]> wrote:
|
In the mid-1970s, I taught stat and methods in a doctoral program in nursing. My students taught me that Doctor is a title. The occupation was physician.
I have been careful to make that distinction ever since. This is what I learned: Ph.D.'s have been "doctor" since the 1300s. M.D.s since the mid 1800s. However, in day-to-day contexts many people have more contact with physicians than with other kinds of doctors. For those not familiar with the "real doctor" situation. In some health contexts physicians refuse to to use the title "Dr" for psychologists, pharmacologists, nuclear physicists, nurses, audiologists, statisticians, epidemiologists, etc. as an implied put-down. To further make things confusing: In formal contexts, such as calling cards a person with a PhD is Dr. Mary Smith with no letters after the name whereas a physician is Susan Jones, M. D. Similarly in formal contexts a letter to a person with a PhD is written Dr. Mary Smith 123 Oak Street ... Dear Dr. Smith a letter to a physician is Susan Jones M.D. 453 Maple Street ... Dear Dr. Jones, In direct verbal address, it is Dr. Smith and Dr. Jones.
Art Kendall
Social Research Consultants |
Administrator
|
In reply to this post by Jon Peck
But I am not. My highest degree is MSc. ;-)
Congrats, Andy.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
I dub you Dr of SPSS, honoris causa. On Sat, Sep 10, 2016 at 11:23 AM, Bruce Weaver <[hidden email]> wrote: But I am not. My highest degree is MSc. ;-) |
Administrator
|
Thanks Jon.
Meanwhile, it occurred to me that I was forgetting that I do in fact have a PhD (in Advanced Pedantics) from the University of Bums on Seats. But I suspect it may not be universally recognized. ;-) http://cynicalbastards.com/ubs/edegree.html
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Free forum by Nabble | Edit this page |