arl_stat ★ India, 2017-02-13 07:58 (2948 d 21:39 ago) Posting: # 17052 Views: 12,563 |
|
Hello Everybody, Greetings !!! My question is how to calculate geometric mean for untransformed data and individual concentration data using PROC GLM in SAS software for 2 way crossover study? Thanks in advance. ![]() |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2017-02-13 12:02 (2948 d 17:34 ago) @ arl_stat Posting: # 17054 Views: 11,211 |
|
Hi arl_stat ❝ My question is how to calculate geometric mean for untransformed data and individual concentration data using PROC GLM in SAS software for 2 way crossover study? ![]() geomean() does the job.— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
DavidManteigas ★ Portugal, 2017-02-13 17:17 (2948 d 12:19 ago) @ Helmut Posting: # 17055 Views: 11,353 |
|
Hi Helmut, geomean() won't solve the problem. A function could only be used within a data step or proc sql. What the user is asking it is impossible (I think) to do within proc glm. The only way of obtaining geometric "LSmean" in proc glm is by using log-transformed data in the model statement as dependent variable. It he/she intends to obtain geometric means from raw data, it could use either geomean within a proc sql query, use geomen within proc survey or by using proc summary in log-transformed data and the exponentiate the result in a data step. Regards, David |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2017-02-14 15:06 (2947 d 14:30 ago) @ DavidManteigas Posting: # 17056 Views: 11,163 |
|
Hi David, THX for enlightening me! Since I’m not equipped with ![]() ![]() — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
d_labes ★★★ Berlin, Germany, 2017-02-14 16:39 (2947 d 12:57 ago) @ Helmut Posting: # 17057 Views: 11,060 |
|
Dear Helmut, dear David, ❝ THX for enlightening me! Since I’m not equipped with It is much more complicated as sooo, add some more ooooo ![]() You can use geomean() in SQL queries as David wrote, proc SQL; but it doesn't do anything, or at least not what one would expect, but gives me the column back, unchanged, and produces a warning: WARNING: The GEOMEAN function has been called with only one argument. However, it is not an SQL What? Why to hell? I don't understand why the SAS people have created such a crippled implementation of the geometric mean, only useful in a data step to calculate the geometric mean over more then one variable, row-wise. And nothing else. Forget it ![]() — Regards, Detlew |
DavidManteigas ★ Portugal, 2017-02-15 11:50 (2946 d 17:47 ago) @ d_labes Posting: # 17060 Views: 10,975 |
|
Dear d_labes, You're absolutely right. Crappy implementation of SQL in SAS as usual, the function does not work even with a "group by" statement as ordinary arithmetic functions work. SAS "reads" data line by line and apply functions to each line. Therefore, this function seems even more useless than I actually thought. Well, from my side I always use proc summary in log-transformed data to calculate geometric means and exponentiate the result. It's amazing how such a routinely used statistic is not avaliable as part of the "default" summary functions in SAS. |
ElMaestro ★★★ Denmark, 2017-02-15 12:21 (2946 d 17:16 ago) @ DavidManteigas Posting: # 17061 Views: 11,019 |
|
Hi David and Detlefff and other grumpy SAS users, you get what you pay for. Big money, big trouble ![]() ❝ You're absolutely right. Crappy implementation of SQL in SAS as usual, the function does not work even with a "group by" statement as ordinary arithmetic functions work. SAS "reads" data line by line and apply functions to each line. Therefore, this function seems even more useless than I actually thought. Transpose the column, then geomean by SQL directly on the transpose, perhaps?A — Pass or fail! ElMaestro |
DavidManteigas ★ Portugal, 2017-02-15 14:06 (2946 d 15:31 ago) @ ElMaestro Posting: # 17062 Views: 10,979 |
|
Hi can't imagine how efficient that would be if you have 5000 observations that you wish to transpose into 5000 new variables ![]() |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2017-02-15 15:26 (2946 d 14:10 ago) @ DavidManteigas Posting: # 17064 Views: 10,921 |
|
Hi David, ❝ […] how efficient that would be […] Who needs efficient software? A friend of mine (in big pharma) had R-code for a large simulation study which completed overnight. The (US-based) company insisted in SAS (because SAS is “validated”…). SAS is poor in handling large datasets in RAM and starts to swap to the HD. Run-time was a couple of months. He had to buy another machine just to run the sim’s. Company was happy with that. Results were practically identical to what he already knew from R months earlier. ![]() Fast cars, fast women, fast algorithms … what more could a man want? Joe Mattis — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
nobody nothing 2017-02-15 16:22 (2946 d 13:15 ago) @ Helmut Posting: # 17065 Views: 10,931 |
|
...better safe than sorry... ![]() SCNR — Kindest regards, nobody |
DavidManteigas ★ Portugal, 2017-02-15 17:12 (2946 d 12:24 ago) @ Helmut Posting: # 17066 Views: 10,895 |
|
Hi Helmut, The problem with "validated software" is in people who does not know anything about "software validation" but always heard that SAS is the Industry standard. I had issues like that sometimes. Clients asking for SAS instead of R since R is not "validated" (although base R is actually validated for use in clinical trials), even for observational studies. They usually understand the point when we send them a new quotation with the extra-fee for software license ![]() |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2017-02-15 17:39 (2946 d 11:57 ago) @ DavidManteigas Posting: # 17067 Views: 10,915 |
|
Hi David, ❝ […] SAS is the Industry standard. Yep – which doesn’t mean a thing. When it comes to spreadsheets, the Industry standard M$ Excel (preferred by the guy in the Armani suit) shows a lousy performance when it comes to statistics but Open Office and Gnumeric are excellent. ❝ They usually understand the point when we send them a new quotation with the extra-fee for software license That’s a splendid idea! — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
d_labes ★★★ Berlin, Germany, 2017-02-15 14:19 (2946 d 15:18 ago) @ ElMaestro Posting: # 17063 Views: 10,943 |
|
Hi ElMaestro, ❝ you get what you pay for. ❝ Big money, big trouble Absolutely correct ![]() — Regards, Detlew |