similar to: Re: R-help Digest, Vol 24, Issue 22

Displaying 20 results from an estimated 1000 matches similar to: "Re: R-help Digest, Vol 24, Issue 22"

2005 Feb 21
2
power.anova.test for interaction effects
This question will probably get me in trouble on theoretical grounds, but I will pose it anyway. The situation: I recently ran a field study looking for differences in sugarbeet cultivar tolerance to a specific herbicide. The study was set up so that 37 cultivars were treated with 4 different applications of the herbicide (37*4 factorial). In doing so, we found that the interaction effect was
2006 Aug 04
2
expression() - Superscript in y-axis, keeping line break in string
I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long label, and thus I have been using "/n" to break it into two lines. However, to make it technically correct for publication, I also need to use superscript in the label. For example: par(oma=c(0,0,2,0),mar=c(5,6,0.25,2),lheight=1) plot(1:10,
2004 Nov 15
2
tsdiag() titles
I am using the ts package to fit ARIMA models, and the tsdiag() function to plot diagnostics. In doing so I'm generating an awful lot of diagnostic plots of different models and different data sets all within the same R session. So my question is, is there an option in tsdiag() similar to <main="Title"> that I can use? This would be quite helpful when I print out the plots,
2010 Jan 11
3
Illustrating kernel distribution in wheat ears
Dear all R2.10 WinXP I have a dataset dealing with the way different wheat cultivars build their yield. Wheat ears are organised in spikelets where the spikelets can be numbered from the bottom, with even numbers on one side and odd on the other. I know how many kernels there were in each spikelet after some months spent counting them... Now I want to illustrate the differences between the
2007 Jul 19
2
Subsetting dataframes
Dear all! W2k, R 2.5.1 I am working with an ongoing malting barley variety evaluation within Sweden. The structure is 25 cultivars tested each year at four sites, in field trials with three replicates and 'lattice' structure (the replicates are divided into five sub blocks in a structured way). As we are normally keeping around 15 varieties from each year to the next, and take in 10 new
2007 Mar 20
1
Error in nlme with factors in R 2.4.1
Hi, the following R lines work fine in R 2.4.0, but not in R 2.4.1 or any devel versions of R 2.5.0 (see below for details). library(drc) # to load the dataset 'PestSci' library(nlme) ## Setting starting values sv <- c(0.43355869, 2.49963220, 0.05861799, 1.73290589, 0.38153146, 0.24316978) ## No error m1 <- nlme(SLOPE ~ c + (d-c)/(1+exp(b*(log(DOSE)-log(e)))), fixed =
2006 Aug 24
1
how to constrast with factorial experiment
Hello, R users, I have two factors (treat, section) anova design experiment where there are 3 replicates. The objective of the experiment is to test if there is significant difference of yield between top (section 9 to 11) and bottom (section 9 to 11) of the fruit tree under treatment. I found that there are interaction between two factors. I wonder if I can contrast means from levels of
2008 Oct 15
2
Network meta-analysis, varConstPower in nlme
Dear Thomas Lumley, and R-help list members, I have read your article "Network meta-analysis for indirect treatment comparisons" (Statist Med, 2002) with great interest. I found it very helpful that you included the R code to replicate your analysis; however, I have had a problem replicating your example and wondered if you are able to give me a hint. When I use the code from the
2007 Mar 14
1
How to transform matrices to ANOVA input datasets?
Hello, R experts, I have a list called dataHP which has 30 elements (m1, m2, ..., m30). Each element is a 7x6 matrix holding yield data from two factors experimental design, with treatment in column, position in row. For instance, the element 20 is: dataHP[[20]] col1 col2 col3 trt1 trt2 trt3 [1,] 22.0 20.3 29.7 63.3 78.5 76.4 [2,]
2001 Feb 13
1
Sticky levels (PR#846)
This isn't actually a bug, but what is one to do in cast of a typo? > citizen<-factor(c("uk","as","no","au","uk","us","us")) > levels(citizen) [1] "as" "au" "no" "uk" "us" > citizen[2]<-"us" > citizen [1] uk us no au uk us us Levels: as au no uk
2012 Jan 27
1
Confused with Student's sleep data description
I am confused whether Student's sleep data "show the effect of two soporific drugs" or Control against Treatment (one drug). The reason is the next: > require(stats) > data(sleep) > attach(sleep) > extra[group==1] numeric(0) > group [1] Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Trt Trt Trt Trt Trt Trt Trt Trt Trt [20] Trt Levels: Ctl Trt > sleep$group [1] 1 1 1 1 1
2008 Jun 04
1
"& not meaningful for factors"
I am trying to define groupings from levels of factor variables and this the warning message that R give "& not meaningful for factors". The nature of my task is this. I have a variable stage which has the levels (1B, 2A, 2B) - these are the AJCC TNM stages of cancer, and another variable diameter with factor levels ("=< 4", "4 - 6.5, > 6.5; limit values are
2010 Dec 01
2
Lattice dotplots
Dear, I have a dataset with 4 subjects (see ID in example), and 4 treatment (see TRT in example) which are tested on 2 locations and in 3 blocs. By using Lattice dotplot, I made a graph that shows the raw data per location and per bloc. In that graph, I would like to have a reference line per bloc that refers to the first treatment (T1). However, I can not find how to do that. I can make
2011 Apr 20
2
survexp with weights
Hello, I probably have a syntax error in trying to generate an expected survival curve from a weighted cox model, but I can't see it. I used the help sample code to generate a weighted model, with the addition of a "weights=albumin" argument (I only chose albumin because it had no missing values, not because of any real relevance). Below are my code with the resulting error
2008 Mar 05
1
Question on "assign(paste.."
Hello, I'm having trouble in using "assign(paste ..." command . I could create several dataframes following trinomial distribution using it but it could not be used to check their row means of the created dataframe. For example, the following works: probTrt=matrix(0,4,3); probTrt; #malf, death, normal probTrt[1,]=c(0.064,0.119,0.817);#for Trt 1 probTrt[2,]=c(0.053,0.125,0.823);#for
2012 May 29
2
use xyplot to plot mean and CI by groups
Dear R users, I am trying to use xyplot to draw group mean and CI. The following is the sample code. But I want: 1. Use different colors and symbols to draw individual points, CI and the lines connect group means from different time points; 2. Add jitters to x axis to allow CIs not be overlapped Could anyone modify the attached code to achieve this? Thanks library(lattice)
2011 Dec 11
2
multiple comparison of interaction of ANCOVA
Hi there, The following data is obtained from a long-term experiments. > mydata <- read.table(textConnection(" + y year Trt + 9.37 1993 A + 8.21 1995 A + 8.11 1999 A + 7.22 2007 A + 7.81 2010 A + 10.85 1993 B + 12.83 1995 B + 13.21 1999 B + 13.70 2007 B + 15.15 2010 B + 5.69 1993 C + 5.76 1995 C + 6.39 1999
2005 Dec 09
1
lmer for 3-way random anova
I have been using lme from nlme to do a 3-way anova with all the effects treated as random. I was wondering if someone could direct me to an example of how to do this using lmer from lme4. I have 3 main effects, tim, trt, ctr, and all the interaction effects tim*trt*ctr. The response variable is ge. Here is my lme code: dat <-
2011 May 03
3
ANOVA 1 too few degrees of freedom
I'm running an ANOVA on some data for respiration in a forest. I am having a problem with my degrees of freedom. For one of my variables I get one fewer degrees of freedom than I should. I have 12 plots and I therefore expected 11 degrees of freedom, but instead I got 10. Any ideas? I have some code and output below: > class(Combined.Plot) [1] "character" >
2006 Mar 07
1
lme and gls : accessing values from correlation structure and variance functions
Dear R-users I am relatively new to R, i hope my many novice questions are welcome. I have problems accessing some objects (specifically the random effects, correlation structure and variance function) from an object of class gls and lme. I used the following models: yah <- gls (outcome~ -1 + as.factor(Trial):as.factor(endpoint)+