similar to: Problem with anova and the new abbreviation restrictions

Displaying 20 results from an estimated 2000 matches similar to: "Problem with anova and the new abbreviation restrictions"

2007 Jul 16
5
formula(CO2)
The formula attribute of the builtin CO2 dataset seems a bit strange: > formula(CO2) Plant ~ Type + Treatment + conc + uptake What is one supposed to do with that? Certainly its not suitable for input to lm and none of the examples in ?CO2 use the above.
2010 Dec 17
2
newbie question on str output
Hi! Here is some output from an str command: > str(CO2) Classes ‘nfnGroupedData’, ‘nfGroupedData’, ‘groupedData’ and 'data.frame': 84 obs. of 5 variables: $ Plant : Ord.factor w/ 12 levels "Qn1"<"Qn2"<"Qn3"<..: 1 1 1 1 1 1 1 2 2 2 ... $ Type : Factor w/ 2 levels "Quebec","Mississippi": 1 1 1 1 1 1 1 1 1 1 ... $
2009 Mar 15
2
xyplot of a specific ID number
Dear R list members, I have a question regarding xyplot. I managed to make a xyplot of all the IDs by using the syntax below: xyplot(PA ~ CRPC + CRPT | ID, data = redinteract) Now, I'd like to make a graph of a specific ID number (e.g., only ID number 301). I thought I could use "subset", but it seems to be not working. Could anyone let me know how I can make a graph of a
2009 Jun 11
1
formula for degrees of freedom for nonlinear mixed model in nlme
Dear forum members, What is the formula to calculate denominator degrees of freedom (den df) for nonlinear mixed-effect models with covariates? My model is similar to a CO2 uptake example from Pinheiro and Bates (2000, page 376). In this CO2 dataset, there are two treatments and two types (84 observations in total), but den df for each parameter of the model is 64. Isn’t it too high? Your
2017 Oct 08
2
Manipulations with CO2 dataset on R
Hi, I just started a new course this semester on R, I never used it in my life and i'm stuck on these questions from 3 days, it would be really nice if someone could explain me the answers with the relative commands. thanks a lot in advance The following 7 questions are based on the CO2 dataset of R. 1) How many of the plants in CO2 are Mc2 for Plant? 2) How many are either Mc2 or Mn2?
2006 Mar 15
1
filtering in aggregate
Hello all, I have a data frame with year, month, species, fishing gear and catch (Y, M, S, F, C) and I want the sum of C by Y for species "A" and fishing gear "trawl". I tried things like aggregate(C[S=="A" & F=="trawl"], list (Year = Y[S=="A" & F=="trawl"]), fun=sum), but it didn't worked. To overcome this problem I did
2007 Jun 04
3
test for nested factors
Is there a conventional way to test for nested factors? I.e., if 'a' and 'b' are lists of same-length factors, does each level specified by 'a' correspond to exactly one level specified by 'b'? The function below seems to suffice, but I'd be happy to know of a more succinct solution, if it already exists. Thanks, Tim. --- "%nested.in%" <-
2006 Aug 10
2
index.cond in xyplot
Dear R-users I have 5 dependent variables (y1 to y5) and one independent variable (x) and 3 conditioning variables (m, n, and 0). Each of the conditioning variables has 2 levels. I created 2*4 panel plots. xyplot(y1+y2+y3+y4+y5 ~ x | m*n*o,layout = c(4,2)) I would like to reorder the 8 panels. I tried to use index.cond (e.g., index.cond = list(c(1,3,2,4,5,7,6,8)) but it didn't work out.
2007 Jan 29
6
Loop with string variable AND customizable "summary" output
Dear All, I am using R for my research and I have two questions about it: 1) is it possible to create a loop using a string, instead of a numeric vector? I have in mind a specific problem: Suppose you have 2 countries: UK, and USA, one dependent (y) and one independent variable (y) for each country (vale a dire: yUK, xUK, yUSA, xUSA) and you want to run automatically the following regressions:
2009 Nov 05
4
The equivalence of t.test and the hypothesis testing of one way ANOVA
I read somewhere that t.test is equivalent to a hypothesis testing for one way ANOVA. But I'm wondering how they are equivalent. In the following code, the p-value by t.test() is not the same from the value in the last command. Could somebody let me know where I am wrong? > set.seed(0) > N1=10 > N2=10 > x=rnorm(N1) > y=rnorm(N2) > t.test(x,y) Welch Two Sample t-test data:
2004 Nov 29
1
Call to trellis.focus(); thenpanel.superpose()
The following works fine with the x11 device, though it may well be that an initial plot is overwritten. With a pdf or postscript device, I get two plots, the first of which still has the red border from having the focus, while the second is the plot that I want. library(lattice); library(grid) plt <- xyplot(uptake ~ conc, groups=Plant, data=CO2) print(plt)
2010 May 07
4
Any way to apply TWO functions with tapply()?
I need to compute the mean and the standard deviation of a data set and would like to have the results in one table/data frame. I call tapply() two times and do then merge the resulting tables to have them all in one table. Is there any way to tell tapply() to use the functions mean and sd within one function call? Something like tapply(data$response, list(data$targets, data$conditions), c(mean,
2006 Oct 23
1
Color eps/ps output from specialized plots?
Hello, First a disclaimer :) I am very new to using R. I am generating some plots and eventhough I can get colored output in the encapsulated postscript files in the simplest of commands (e.g. plot(1:10,1:10, type="l", col="red") ), it does not work for the particular plots I want. It works on the screen. Here is an example taken out from "Mixed-Effects Models in S and
2007 May 25
2
xyplot: different scales accross rows, same scales within rows
Dear list members, I would like to set up a multiple panel in xyplots, with the same scale for all colunms in each row, but different accross rows. relation="free" would set up all x or y scales free... which is not what I want :-( Is this possible? Thank you in advance, Best wishes, Marta
2009 Mar 02
1
xyplot color question
Hi, I am plotting scatterplots of horsepower by torque, conditional on brand (I'm just making up the variables for this example), and the goal is to see both the scatterplot points as well as the smoothed line. When I do the following code, I get the same color for the points and line, and would like the colors to be different, such as black points and a red smoothed line. How do I do that?
2009 Mar 02
1
xy-plot alb font size
I would appreciate any help for the following question. How to increase the font size of labels for the x and y axes in the following code? --------------------------------- xyplot(lbxglu~lbxgh|eth,reg.dat.5, panel = p, col = 1:2, par.strip.text = list(cex = 1.25,col="brown"), xlab="A1C",ylab="Fasting Plasma Glucose", main="FPG") p <- function(..., col)
2010 Feb 09
1
"1 observation deleted due to missingness" from summary() on the result of aov()
I have the R code at the end. The last command gives me "1 observation deleted due to missingness". I don't understand what this error message. Could somebody help me understand it and how to fix the problem? > summary(afit) Df Sum Sq Mean Sq F value Pr(>F) A 2 0.328 0.16382 0.1899 0.82727 B 3 2.882 0.96057 1.1136 0.34644 C
2000 Dec 08
1
Problem with multiple factors in nlme
Dear R-experts, I have a problem to formulate non linear mixed effects when more than one explanatory variable is present. I'm using R 1.1.1 under Linux. The version number of the nlme library is 3.1-7. "help(nlme)" says that among several possibilities it is possible to code fixed effects according to fixed = a1 + a2 + ... + an ~ X1 + X2 + ... + Xm where the left hand side
2012 Oct 22
3
Error: object 'CO2' not found
Hello: I am new on R, this is the first time I work with it, I am trying to run some R example to get learn of them, but, I have a problem when running the example below: http://stat.ethz.ch/R-manual/R-patched/library/datasets/html/zCO2.html CO2.Qn1 <- CO2[CO2$Plant == "Qn1", ] SSasympOff(CO2.Qn1$conc, 32, -4, 43) # response only Asym <- 32; lrc <- -4; c0 <- 43
2011 Aug 20
1
Groups and bwplot
Dear R-users, A while ago, Deepayan Sarkar suggested some code that uses the group argument in bwplot to create some 'side-by-side' boxplots (https://stat.ethz.ch/pipermail/r-help/2010-February/230065.html). The example he gave was relatively specific and I wanted to generalize his approach into a function. Unfortunately, I seem to have some issues passing the correct arguments to the