Hello,
I use pkcollapse quite often to generate area under the curve and calculate incremental area under the curve. I have used it in recent days with the same code setup as always and it was functioning, however I've just gone to run the same code again and have gotten an error. Specifically, I received an error that a particular variable was already defined, and this seems to be stemming from stat() not functioning as expected; that is to say, when I run the code, more variables are being added to my dataset than what I am specifying.
I have some of my example data below, and the code I'm using is as follows:
Instead of just giving me auc as I've indicated with stat(auc), it is giving me aucline, aucexp, etc. (as if I did not specify stat() at all, so am getting all variables by default).
Any help anyone can provide would be much appreciated! Apologies in advance if this is a very silly question and I'm missing something obvious.
-Meghan
I use pkcollapse quite often to generate area under the curve and calculate incremental area under the curve. I have used it in recent days with the same code setup as always and it was functioning, however I've just gone to run the same code again and have gotten an error. Specifically, I received an error that a particular variable was already defined, and this seems to be stemming from stat() not functioning as expected; that is to say, when I run the code, more variables are being added to my dataset than what I am specifying.
I have some of my example data below, and the code I'm using is as follows:
Code:
pkcollapse time glucose, id(id) keep(fasting_glucose visit) stat(auc) trapezoid
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int id float(visit time glucose fasting_glucose) 3 0 0 75.5 74.2 3 0 10 76.8 74.2 3 0 15 79.6 74.2 3 0 20 88.1 74.2 3 0 30 104 74.2 4 0 0 113.5 114 4 0 10 110.5 114 4 0 15 119 114 4 0 20 135.5 114 4 0 30 174 114 5 0 0 91.6 90.625 5 0 10 92.5 90.625 5 0 15 108 90.625 5 0 20 128.9 90.625 5 0 30 159.5 90.625 6 0 0 83.1 83.52499 6 0 10 84.75 83.52499 6 0 15 87.5 83.52499 6 0 20 98 83.52499 6 0 30 129 83.52499 8 0 0 100.5 99.675 8 0 10 97.6 99.675 8 0 15 103.4 99.675 8 0 20 105.6 99.675 8 0 30 143 99.675 9 0 0 88.7 89.6 9 0 10 90.6 89.6 9 0 15 92 89.6 9 0 20 98.4 89.6 9 0 30 121 89.6 end
Any help anyone can provide would be much appreciated! Apologies in advance if this is a very silly question and I'm missing something obvious.
-Meghan

Comment