I found 2 problems with this method:

- There is only one line for predicted dose at 5 mg.
- The different doses are 5, 7, and 10 mg but somehow there is a legend for
5,6,7,8,9,10.
- Is there a way to make the line smooth?
- The plots are also getting a little crowded and I was wondering if there a
way to split it into 2 or more pages?

Thanks for your help.

On Thu, Oct 14, 2010 at 8:09 PM, Ista Zahn <iz...@psych.rochester.edu>wrote:

> Hi,
> Assuming the data is in a data.frame named "D", something like
>
> library(ggplot2) # May need install.packages("ggplot2") first
> ggplot(D, aes(x=Time, y=Concentration, color=Dose) +
> geom_point() +
> geom_line(aes(y = PredictedConcentration, group=1)) +
> facet_wrap(~ID, scales="free", ncol=3)
>
> should do it.
>
> -Ista
> On Thu, Oct 14, 2010 at 10:25 PM, thaliagoo <eataban...@gmail.com> wrote:
> >
> > Hello-- I have a data for small population who took 1 drug at 3 different
> > doses. I have the actual drug concentrations as well as predicted
> > concentrations by my model. This is what I'm looking for:
> >
> > - Time vs Concentration by ID (individual plots), with each subject
> > occupying 1 plot -- there is to be 9 plots per page (3x3)
> > - Observed drug concentration is made up of points, and predicted drug
> > concentration is a curve without points. Points and curve will be the
> same
> > color for each dose. Different doses will have different colors.
> > - A legend to specify which color correlates to which dose.
> > - Axes should be different for each individual (as some individual will
> have
> > much higher drug concentration than others) and I want to see in detail
> how
> > well predicted data fits observed data.
> >
> > Any help would be greatly appreciated.
> > --
> > View this message in context:
> http://r.789695.n4.nabble.com/Time-vs-Concentration-Graphs-by-ID-tp2996431p2996431.html
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > ______________________________________________
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>
>
> --
> Ista Zahn
> Graduate student
> University of Rochester
> Department of Clinical and Social Psychology
> http://yourpsyche.org
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to