calculate AUC in R per ID and for glucose levels above 10, 11, 12 etc
0
0
Entering edit mode
4.4 years ago
arbuni736 • 0

hey guys, I need little help in R, I have to calculate AUC for different glucose intervals using trapezoid method...for each ID, and for intervals, for example conc>10, conc>11. conc>12...I need to adjust the following code for different intervals, do not how:) maybe nested loop, or smth

  1. apply(split(data,data$ID), function(data), trapz(data$time, data$conc))
  2. get_auc(data, time="time", id="id", dv="conc")
AUC trapz R • 838 views
ADD COMMENT

Login before adding your answer.

Traffic: 2036 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6