Re: [R] lineplot.CI in "sciplot": option "ci.fun" can't be changed?

2010-04-02 Thread Manuel Morales
For now, just change fun(x) to median(x) (or whatever) in your ci.fun() below. E.g. lineplot.CI(x.factor = dose, response = len, data = ToothGrowth, ci.fun= function(x) c(mean(x)-2*se(x), mean(x)+2*se(x))) Otherwise, maybe the list members could help with a solution. An example that illustrates

Re: [R] bargraph.ci - CI and color question.

2009-11-03 Thread Manuel Morales
ror bars reflect this using the > ci.fun argument. Can I use this argument or is some pre-processing > necessary? If this information is located somewhere besides the > ?bargraph.ci help I would greatly appreciate an indication of where it > is. > > Thank you kindly, > Mi

Re: [R] bargraph.ci - CI and color question.

2009-11-03 Thread Manuel Morales
On Tue, 2009-11-03 at 03:51 -0600, Michael Just wrote: > Hello, > When using bargraph.CI in package sciplot can the bars for each group > be different colors? How do I select the color for each group? With the option err.col bargraph.CI(dose, len, group = supp, data =ToothGrowth, err.col=c("gray

Re: [R] lme, lmer, gls, and spatial autocorrelation

2009-08-24 Thread Manuel Morales
Hi Tim, I don't believe there is a satisfactory solution in R - at least yet - for non-normal models. Ultimately, this should be possible using lmer() but not in the near-term. One possibility is to use glmPQL as described in: Dormann, F. C., McPherson, J. M., Araújo, M. B., Bivand, R., Bolliger,

[R] nls vs nlme: parameter constraints

2009-06-22 Thread Manuel Morales
Hello list, I'm trying to fit a model like beta[trt]/(1+alpha*x) where the data include some grouping factor. The problem is that the estimate for alpha is undefined for some of the treatments - any value greater than 20 is equally good and a step function would suffice. Ignoring the grouping stru

Re: [R] Re strict AIC comparison to succesful models?

2009-06-11 Thread Manuel Morales
On Thu, 2009-06-11 at 16:10 -0400, Ben Bolker wrote: > Manuel Morales wrote: > > On Thu, 2009-06-11 at 12:08 -0700, Ben Bolker wrote: > >> > >> Manuel Morales wrote: > >>> Hello list, > >>> > >>> I'm doing a bootstrap analysi

Re: [R] Re strict AIC comparison to succesful models?

2009-06-11 Thread Manuel Morales
On Thu, 2009-06-11 at 12:08 -0700, Ben Bolker wrote: > > > Manuel Morales wrote: > > > > Hello list, > > > > I'm doing a bootstrap analysis where some models occasionally fail to > > converge. I'd like to automate the process of restricting AI

[R] Restrict AIC comparison to succesful models?

2009-06-11 Thread Manuel Morales
Hello list, I'm doing a bootstrap analysis where some models occasionally fail to converge. I'd like to automate the process of restricting AIC to the models that do converge. A contrived example of what I'd like to do is below: resp <- c(1,1,2) pred <- c(1,2,3) m1 <- lm(resp~pred) m2 <- lm(resp

Re: [R] sciplot question

2009-05-25 Thread Manuel Morales
>>>>> plotting functions associates closer to the confidence interval > >>>>> ) error indication . > >>>>> - Jarle Bjørgeengen > >>>>> On May 24, 2009, at 3:02 , Manuel Morales wrote: > >>>>>> You defin

Re: [R] sciplot question

2009-05-24 Thread Manuel Morales
You define your own function for the confidence intervals. The function needs to return the two values representing the upper and lower CI values. So: qt.fun <- function(x) qt(p=.975,df=length(x)-1)*sd(x)/sqrt(length(x)) my.ci <- function(x) c(mean(x)-qt.fun(x), mean(x)+qt.fun(x)) lineplot.CI(x.f

Re: [R] nls factor

2009-04-15 Thread Manuel Morales
On Wed, 2009-04-15 at 12:02 -0400, Michael A. Miller wrote: > >>>>> "Manuel" == Manuel Morales writes: > > > nls(y ~ a[fac]*x^b, start=list(a=c(1,1), b=0.25)) > > Did you mean a[f]? > > nls(y ~ a[f]*x^b, start=list(a=c(1,1), b=0.25)) >

Re: [R] nls factor

2009-04-15 Thread Manuel Morales
Oops! I made a mistake. Corrected below. On Wed, 2009-04-15 at 11:05 -0400, Manuel Morales wrote: > A more compact way to code factors in nls is to use the syntax factor[]. > > Here's an example using a simplified version of Ravi's example: > > n <- 200 > set.seed

Re: [R] nls factor

2009-04-15 Thread Manuel Morales
A more compact way to code factors in nls is to use the syntax factor[]. Here's an example using a simplified version of Ravi's example: n <- 200 set.seed(123) x <- runif(n) a <- gl(n=2, k=n/2) # a two-level factor eps <- rnorm(n, sd=0.5) y <- as.numeric(a) * x^.5 + eps nls(y ~ a[]*x^b, start=l

Re: [R] Problem with bargraph.CI in Sciplot package

2009-04-14 Thread Manuel Morales
On Sat, 2009-04-11 at 08:10 -0400, Manuel Morales wrote: > On Fri, 2009-04-10 at 15:07 -0700, Metconnection wrote: > > Hi there, > > I wonder if anyone can help me. I'm trying to use bargraph.CI in the Sciplot > > package when there is a missing combin

Re: [R] Problem with bargraph.CI in Sciplot package

2009-04-11 Thread Manuel Morales
On Fri, 2009-04-10 at 15:07 -0700, Metconnection wrote: > Hi there, > I wonder if anyone can help me. I'm trying to use bargraph.CI in the Sciplot > package when there is a missing combination of the factor levels. > Unfortunately the standard errors on the plot do not appear to be correct. > >

Re: [R] using par funtions in bargraph.CI()

2009-03-02 Thread Manuel Morales
On Mon, 2009-03-02 at 11:23 -0600, maxa0...@umn.edu wrote: > I'm trying to create a bargraph of means with standard error bars using the > function bargraph.CI (in the sciplot package). Like this: > > bargraph.CI(x.factor, response,data,xlab, ylab, par(family="serif"),font=11) > > However, an er

[R] Installing archived package alongisde current one

2009-02-24 Thread Manuel Morales
Hi list, I'd like to install an archived version of lmer to compare results with the current version. I guess one way to do this would be to download the source, rename the package and then install it. Is there a better alternative? -- http://mutualism.williams.edu signature.asc Description: T

[R] Constraint in nls with factor in model?

2009-02-18 Thread Manuel Morales
Hi all, I'm trying to fit a model using the shorthand coeff[factor] instead of coding dummy variables. Is there a way to keep this notation when specifying constraints? See example below: x = runif(200) b0 = c(rep(0,100),runif(100)) b1 = 1 fac <- as.factor(rep(c(0,1), each=100)) y = b0+b1*x+rnorm

Re: [R] plotCI

2008-10-11 Thread Manuel Morales
On Fri, 2008-10-10 at 18:15 -0300, Caio Azevedo wrote: > Hi all, > > I am using the function "plotCI" with the following command: > > plotCI(m.residuos.p.2 [1:41],li=m.residuos.p.3 [1:41],ui=m.residuos.p.4 > [1:41],lty=1,ylab="") > > This generates exactly what I want except for the fact that I

Re: [R] Plot means with error bars - A novice needs help

2008-10-08 Thread Manuel Morales
On Wed, 2008-10-08 at 09:49 -0700, Dylan Beaudette wrote: > On Wednesday 08 October 2008, Manuel Morales wrote: > > Another option is bargraph.CI or lineplot.CI from the package sciplot. > > > > See http://mutualism.williams.edu/sciplot for examples. > > > >

Re: [R] Plot means with error bars - A novice needs help

2008-10-08 Thread Manuel Morales
On Wed, 2008-10-08 at 12:01 -0500, Michael Just wrote: > Thank you all for you suggestions. They are all helpful. However, I have > come to a more fundamental problem. Preparing my data to even make such a > graph. I thought I was ready. I will obviously need to find the n, mean, > and confidence

Re: [R] Plot means with error bars - A novice needs help

2008-10-08 Thread Manuel Morales
Another option is bargraph.CI or lineplot.CI from the package sciplot. See http://mutualism.williams.edu/sciplot for examples. On Tue, 2008-10-07 at 23:31 -0500, Michael Just wrote: > Hello, > I'd appreciate a suggestion on how to construct plots (barplots?) that use > means on the Y axis instead

Re: [R] analysing mixed effects/poisson/correlated data

2008-03-08 Thread Manuel Morales
On Sat, 2008-03-08 at 08:07 -0600, Douglas Bates wrote: > On Sat, Mar 8, 2008 at 2:57 AM, Alexandra Bremner > <[EMAIL PROTECTED]> wrote: > > I am attempting to model data with the following variables: > > > timepoint - n=48, monthly over 4 years > > hospital - n=3 > > opsn1 - no of outcomes

Re: [R] lineplot.CI problem

2008-02-16 Thread Manuel Morales
Here's an updated version of lineplot.CI that will succeed even for cases where data are not present in all factor combinations. Also, this version has the option x.cont to specify that the x axis represents a continuous variable with proportional spacing. A new version of sciplot with these change

Re: [R] lineplot.CI problem

2008-02-15 Thread Manuel Morales
On Fri, 2008-02-15 at 15:18 +0100, Dieter Vanderelst wrote: > Hi List, > > I have a problem plotting data using the lineplot.CI command in the sciplot > package. > > I want to plot the data of 2 experimental cases using different lines > (traces). Time is on the X-axis. The tricky thing is that

Re: [R] barplot or maybe related?

2008-02-11 Thread Manuel Morales
On Mon, 2008-02-11 at 09:31 -0800, questions? wrote: > I have two distributions, represented by heights of several intervals. > e.g. the distribution is partitioned into 10 segments, I have > numbers(freq or counts) associated > with each region in the format as: > > 0.2 0.3 > 0.1 0.1 > . >

Re: [R] Bar plot with error bars

2007-10-23 Thread Manuel Morales
Hi Katherine, If you have the original data, you can use the function barplot.CI from the package sciplot which will calculate the means and CI's for you. Examples are at: http://mutualism.williams.edu/sciplot If you have the means and CI's already calculated, the following function will do what