[R] Piecewise Regression with a known slope

2007-07-30 Thread Jarrett Byrnes
Hey, all. I'm working on a data set with a broken stick linear regression where I know one of the two slopes. It is a negative linear function until the line intersects with the x-axis, at which point it becomes 0. It is not a nonlinear asymptotic function, and, indeed, using negative ex

[R] Going from Coda Files to R2WinBUGS

2007-04-29 Thread Jarrett Byrnes
I'm currently using JAGS as my Bayesian program of choice due to working off of an older mac running OSX. I'd like to utilize some of the functions from R2WinBUGS, however. As such, I'm attempting to write something to go from coda output dumped by JAGS into the bugs object format - I've

[R] glms with poisson and negative binomial errors

2007-02-21 Thread Jarrett Byrnes
A reviewer recently remarked to me that, due to my data being constrained to not fall below zero, a generalized linear model with a negative binomial error (or poisson) with a log link would be more appropriate for fitting my model. I ran it in R with glm.nb() and got results that matched

[R] Advice on visual graph packages

2007-02-13 Thread Jarrett Byrnes
Hey, all. I'm looking for packages that are good at two things 1) Drawing directed graphs (i.e nodes and edges), both with single and double headed arrows, as well as allowing for differences in line width and solid versus dashed. Note: I've tried Rgraphviz here, but have run into some pro

Re: [R] comments in scan

2006-11-27 Thread Jarrett Byrnes
Right, but what if it is not the first line? For example #data block 1 34,54,23 23,53,12 35,23,23 #data block 2 64,24,13 354,24,12 324,13,3 On Nov 27, 2006, at 4:39 PM, Duncan Murdoch wrote: > On 11/27/2006 7:25 PM, Jarrett Byrnes wrote: >> I had a question about scan in R. For be

[R] comments in scan

2006-11-27 Thread Jarrett Byrnes
I had a question about scan in R. For better code readability, I would like to have lines in the block of data to be scanned that are commented - not just lines that have a comment at the end. For example #age, weight, height 33,128,65 34,56,155 instead of having to do something like 33,12

Re: [R] Updating lmer - object is not subsettable?

2006-09-12 Thread Jarrett Byrnes
6, at 8:16 PM, Douglas Bates wrote: > Can you show a traceback on this example? It may be related to a > problem that I just fixed in the development version of the lme4 > package. > > Alternatively if you can make the data available I can generate a > traceback myself. > >

[R] Updating lmer - object is not subsettable?

2006-09-12 Thread Jarrett Byrnes
I'm attempting to write a general function to implement Faraway's bootstrapping algorithm for mixed models with lmer, but have run into a curious problem. I'm comparing two models model.1<-lmer(Response ~ Treatment + (1|Trial), data=exp.data, method="ML") model.2<-lmer(Response ~ 1 + (1|Tri

Re: [R] Autoregressive Model with Independent Variable

2006-03-02 Thread Jarrett Byrnes
On Mar 1, 2006, at 8:35 PM, Dirk Eddelbuettel wrote: > > On 1 March 2006 at 20:06, Jarrett Byrnes wrote: > | Hey, all, I may just be missing something, but I'm trying to > construct > | a temporal autoregression with an independant variable other than > just > | what

Re: [R] Autoregressive Model with Independent Variable

2006-03-02 Thread Jarrett Byrnes
On Mar 1, 2006, at 8:35 PM, Dirk Eddelbuettel wrote: > > On 1 March 2006 at 20:06, Jarrett Byrnes wrote: > | Hey, all, I may just be missing something, but I'm trying to > construct > | a temporal autoregression with an independant variable other than > just > | what

[R] Autoregressive Model with Independent Variable

2006-03-01 Thread Jarrett Byrnes
Hey, all, I may just be missing something, but I'm trying to construct a temporal autoregression with an independant variable other than just what is happened at a previous point in time. So, the model structure would be something like y(t)=b0+b1*y(t-1)+b2*y(t-2)...+a*x(t) I'm even considerin

[R] Canonical Values and Centroids for MANOVA plots

2006-02-28 Thread Jarrett Byrnes
just taken it upon themselves to learn R, and it's going swimmingly so far! -------- Jarrett Byrnes Population Biology Graduate Group, UC Davis Bodega Marine Lab 707-875-1969 http://www-eve.ucdavis.edu/stachowicz/by

Re: [R] Repeates Measures MANOVA for Time*Treatment Interactions

2005-11-15 Thread Jarrett Byrnes
Ah, so, if, say, I sampled on the 1st, 4th, 19th, 20th, and 30th day of a month, I should use: idata=data.frame(time=c(1,4,19,20,30)) On Nov 15, 2005, at 11:08 AM, Peter Dalgaard wrote: > Peter Dalgaard <[EMAIL PROTECTED]> writes: > >> No... idata is the *intra*-block structure, so it should ju

[R] Repeates Measures MANOVA for Time*Treatment Interactions

2005-11-15 Thread Jarrett Byrnes
yself and for LOTS of other ecology types! -Jarrett ---- Jarrett Byrnes Population Biology Graduate Group, UC Davis Bodega Marine Lab 707-875-1969 http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.c

Re: [R] Type II and III sums of squares with Error in AOV

2005-11-09 Thread Jarrett Byrnes
bout to make a similar comment. A possible exception is ANCOVA > where you likely want to test both the within-stratum effect of a > covariate and the effect of design factors adjusted for the covariate. > > >> On Tue, 8 Nov 2005, Jarrett Byrnes wrote: >> >>> I

[R] A Quick and (Very) Dirty Intro to Stats in R

2005-11-08 Thread Jarrett Byrnes
wn, but would like to use manova a la the repeated statement in SAS. 5) Better output for post-hocs, and a Ryan's Q implementation. Thanks in advance for any input, and I hope this can be a resource to a lot of people! Jarrett Byrnes Population Biology Gradu

[R] Type II and III sums of squares with Error in AOV

2005-11-08 Thread Jarrett Byrnes
I've recently run into the problem of using aov with nested factors, and wanting to get the type II and III sums of squares. Normally Anova from the car package would do fine, but it doesn't like having an Error included, so my.aov <-aov(Response ~ Treatment + Error(Treatment:Replicate)) Anova

Re: [R] Simple Nesting question/Odd error message

2005-11-08 Thread Jarrett Byrnes
+ slipfactor%in%Dock, data=my.data) works just fine. Is there something fundamental that I am missing in the syntax? On Nov 8, 2005, at 2:06 AM, Dieter Menne wrote: > Jarrett Byrnes arrr.net> writes: > >> I'm having syntactical issues, however. When I try >> >

[R] Simple Nesting question/Odd error message

2005-11-07 Thread Jarrett Byrnes
I'm attempting to analyze some survey data comparing multiple docks. I surveyed all of the slips within each dock, but as slips are nested within docks, getting multiple samples per slip, and don't really represent any meaningful gradient, slip is a random effect. There are also an unequal nu

Re: [R] Plotting Factorial GLMs

2005-11-04 Thread Jarrett Byrnes
the first place (i.e. break up the x,y values by block, then color them differently, and plot them on top of each other as add=TRUE doesn't seem to work for the plot statement - any pointers?) On Nov 3, 2005, at 10:31 PM, Jarrett Byrnes wrote: > Hello all, > I'm att

[R] Plotting Factorial GLMs

2005-11-03 Thread Jarrett Byrnes
Hello all, I'm attempting to plot the functions from a generalized linear model while iterating over multiple levels of a factor in the model. In other words, I have a data set Block, Treatment.Level, Response.Level So, the glm and code to plot should be logit.reg<-glm(formula = Respo

[R] R Graphs in Powerpoint

2005-10-31 Thread Jarrett Byrnes
Hey, all. Quick question. I'm attempting to use some of the great graphs generated in R for an upcoming talk that I'm writing in Powerpoint. Copying and pasting (I'm using OSX) yields graphs that look great in Powerpoint - until I resize them. Then fonts, points, and lines all become quite

[R] lm type of sums of squares

2005-10-28 Thread Jarrett Byrnes
I'm curious, I realize there are methods for Type II and III sums of squares, and yet, when I've been constructing models with lm, I've noticed that position of the term of the model has not mattered in terms of its p-value. Does lm use sequential Type I sums of squares, or something else? Th

Re: [R] Post Hoc Groupings

2005-10-26 Thread Jarrett Byrnes
to > make Dock and Slip factors. > > dock_2004_data$Dockf<-factor(dock_2004_data$Dock) > > dock_2004_data$Slipf<-factor(dock_2004_data$Slip) > > rich.aov <- aov(X.open ~ Dockf*Slipf, data=dock_2004_data) > > TukeyHSD(rich.aov, c("Dockf", "Slipf&quo

Re: [R] Post Hoc Groupings

2005-10-26 Thread Jarrett Byrnes
Indeed, the following works as well On Oct 26, 2005, at 5:23 PM, P Ehlers wrote: > fm1 <- aov(breaks ~ wool*tension, data = warpbreaks) > TukeyHSD(fm1, c("wool","tension", "wool:tension")) However, when working with my own dataset, I get the following errors. I have some inkling this may be d

[R] Post Hoc Groupings

2005-10-26 Thread Jarrett Byrnes
Quick question, as I attempt to learn R. For post-hoc tests 1) Is there an easy function that will take, say the results of tukeyHSD and create a grouping table. e.g., if I have treatments 1, 2, and 3, with 1 and 2 being statistically the same and 3 being different from both Group Treatmen

[R] Ryan's Q Post-Hoc for ANOVA

2005-10-25 Thread Jarrett Byrnes
I'm using lm to run an ANOVA, and would like to use Ryan's Q as my post-hoc (as recommended by Day and Quinn, 1989, Ecological Monographs). I can't seem to find any methods in the base stats package that implement this post-hoc. Is there a good package of post-hoc methods out there, or has so

[R] Getting univariate information from a multivariate data set

2005-10-22 Thread Jarrett Byrnes
ce for any help! -Jarrett ------------ Jarrett Byrnes Population Biology Graduate Group, UC Davis Bodega Marine Lab 707-875-1969 http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE