1

I have data in the following format:

Time Endpoint.Value PlasmaConc Group AnimalID
 0        120          .8        1      1
 2        140          .4        1      1
 4        115          .2        1      1
 8        108          .1        1      1
 24       100          .0        1      1
 0        115          .9        1      2
 2        130          .7        1      2
 4        112          .4        1      2
 8        110          .3        1      2
 24       107          .1        1      2
 ...
 0        112          .6        1      12
 2        104          .5        1      12
 4        98           .2        1      12
 8        78           .15       1      12
 24       58           .08       1      12



endpointPlot <- ggplot(data = allData, aes(x = Time, y = Endpoint.Value, group = Group, color = Group)) + geom_point()+
  stat_summary(geom = "point", fun.y = mean, shape = 17, size = 7)+
  stat_smooth(aes(fill = Group))+
  ggtitle("Endpoint (Glucose) vs Time with smoothed standard errors by Group")

concentrationPlot <- ggplot(data = allData, aes(x = Time, y = PlasmaConc, group = Group, color = Group)) + geom_point()+
  stat_summary(geom = "point", fun.y = mean, shape = 17, size = 7)+
  stat_smooth(aes(fill = Group))+
  ggtitle("Plasma Concentration vs Time with smoothed standard errors by Group")

Is there a way I can do this with a 3d plot? With time on one axis, PlasmaConc on the other and Endpoint.Value on the z axis?

Thanks!

Edit: Here's the requested info:

The first few columsn are:

 PlasmaConc
Time 0 0.0381 0.0453 0.0708 0.0754 0.0846 0.129 0.15 0.311 0.313 0.368 0.4 0.427 0.446 0.535 0.657 0.674 0.678 0.719 0.87 0.882 0.934 1.01 1.02 1.03 1.09 1.12 1.15 1.16 1.17 1.19
  0  6      0      0      0      0      0     0    0     0     0     0   0     0     0     0     0     0     0     0    0     0     0    0    0    0    0    0    0    0    0    0
  1  6      0      0      0      0      0     0    0     0     0     0   0     0     0     0     0     0     0     0    0     0     0    1    0    0    1    0    0    0    0    0
  2  6      0      0      0      0      0     0    0     0     0     0   0     0     0     0     0     0     0     0    0     1     0    0    0    0    0    0    0    0    0    0
  4  6      0      0      0      0      0     0    0     0     0     0   0     0     0     0     0     1     1     0    0     0     0    0    0    1    0    0    1    1    0    0
  8  6      0      0      0      0      0     0    0     1     1     1   1     0     0     1     1     0     0     0    1     0     0    0    1    0    0    1    0    0    0    1
user1357015
  • 11,168
  • 22
  • 66
  • 111
  • Possibly. What does this return `with(allData, table( time, PlasmaConc ) )`? Add that info as an edit to your question s you preserve formating. – IRTFM Mar 06 '15 at 02:39
  • @BondedDust: I've posted the requested information. – user1357015 Mar 07 '15 at 16:37
  • The goal was to see what fraction of the interior "cells" had data and whether there were any regions where there were enough data points to support a surface being constructed. Two options: aggregation within sensibly chosen grouping intervals and interpolation or kriging. You might want to do a search on SO for `akima` or other functions that support interpolation. (I personally refuse to play with questions that have "......" lines in the data display.) Worked example: http://stackoverflow.com/questions/14228761/about-plot-contour-figure-by-using-r-code/14230286?s=1|0.7962#14230286 – IRTFM Mar 07 '15 at 16:47

0 Answers0