Displaying 20 results from an estimated 10000 matches similar to: "aov with Error and lme"
2003 Dec 02
1
lme: reproducing example
Dear R-community!
I still have the problem reproducing the following
example using lme.
id<-factor(rep(rep(1:5,rep(3,5)),3))
factA <- factor(rep(c("a1","a2","a3"),rep(15,3)))
factB <- factor(rep(c("B1","B2","B3"),15))
Y<-numeric(length=45)
Y[ 1: 9]<-c(56,52,48,57,54,46,55,51,51)
Y[10:18]<-c(58,51,50,54,53,46,54,50,49)
2013 Mar 25
1
a contrast question
Dear R People:
I have the following in a file:
resp factA factB
39.5 low B-
38.6 high B-
27.2 low B+
24.6 high B+
43.1 low B-
39.5 high B-
23.2 low B+
24.2 high B+
45.2 low B-
33.0 high B-
24.8 low B+
22.2 high B+
and I construct the data frame:
> collard.df <- read.table("collard.txt",header=TRUE)
> collard.aov <- aov(resp~factA*factB,data=collard.df)
>
2009 Sep 15
1
coefficients of aov results has less number of elements?
Hi,
I run the following commands. 'A' has 3 levels and 'B' has 4 levels.
Should there be totally 3+4 = 7 coefficients (A1, A2, A3, B1, B2, B3,
B4)?
> a=3
> b=4
> n=1000
> A = rep(sapply(1:a,function(x){rep(x,n)}),b)
> B = as.vector(sapply(sapply(1:b, function(x){rep(x,n)}), function(x){rep(x,a)}))
> Y = A + B + rnorm(a*b*n)
>
> fr =
2007 Mar 09
1
Applying some equations over all unique combinations of 4 variables
#I have a data set that looks like this.   A bit more
complicated actually with
# three factor levels but these calculations need to
be done on one factor at a
#I then have a set of different rates that are applied
#to it.
#dataset
cata <- c( 1,1,6,1,1,2)
catb <- c( 1,2,3,4,5,6)
doga <- c(3,5,3,6,4, 0)
data1 <- data.frame(cata, catb, doga)
rm(cata,catb,doga)
data1
# start rates
#
2009 Oct 29
3
Removing & generating data by category
Dear R users,
Basically, from the following arbitrary data set:
a <-
data.frame(id=c(c("A1","A2","A3","A4","A5"),c("A3","A2","A3","A4","A5")),loc=c("B1","B2","B3","B4","B5"),clm=c(rep(("General"),6),rep("Life",4)))
> a
 
2003 Nov 16
1
SE of ANOVA (aov) with repeated measures and a bewtween-subject factor
Hallo!
I have data of the following design: 
NSubj were measured at Baseline (visit 1) and at 3
following time points (visit 2, visit 3, visit 4).
There is or is not a treatment.
Most interesting is the question if there is a
difference in treatment between the results of visit 4
and baseline. (The other time points are also of
interest.) The level of significance is alpha=0.0179
(because of an
2003 Dec 17
1
TODO hardlink reporting problem - fixed?
On Mon, 15 Dec 2003, jw schultz <jw@pegasys.ws> wrote:
> OK, first pass on TODO complete.
....
This hardlink bug report is nearly 21 months old...  So I took a look
at it using 2.5.7.  See below.
> BUGS ---------------------------------------------------------------
> 
> Fix hardlink reporting                                                2002/03/25
>   (was: There seems
2013 Mar 12
2
big edge list to adjacency matrix
I have huge list of edges with weights.
a1 b1 w1
a2 b2 w2
a3 b3 w3
a1 b1 w4
a3 b1 w5
I have to convert it into 2 dim matrix
     b1                b2          b3
a1  max(w1,w4)   0           0
a2            0        w2         0
a3        w5          0           w3
if edges repeated take the maximum weights. How do this efficiently without
using for loop? Any idea.
thanks
Avi
	[[alternative
2011 May 30
2
Basic question about three factor Anova
Read the data using scan():
#
#          a1               a2               a3               a4
#     -------------    -------------    -------------    -------------
#     b1   b2   b3     b1   b2   b3     b1   b2   b3     b1   b2   b3
#     ---  ---  ---    ---  ---  ---    ---  ---  ---    ---  ---  ---
#
# c1:
#     4.1  4.6  3.7    4.9  5.2  4.7    5.0  6.1  5.5    3.9  4.4  3.7
#     4.3  4.9
2005 Mar 19
2
simple problem, but not for me
Hello, I'm new in R and I want to do one thing that is very easy in excel, however, I cant do it in R.
Suppose we have the data frame:
 
data<- data.frame(A=c("a1","a2","a3","a4","a5"))
 
I need to obtain another column in the same data frame (lets say B=c(b1,b2,b3,b4,b5) in the following way:
 
b1=a1/(a1+a2+a3+a4+a5)
2011 Mar 05
2
Repeating the same calculation across multiple pairs of variables
Hi all,
 
I frequently encounter datasets that require me to repeat the same calculation across many variables. For example, given a dataset with total employment variables and manufacturing employment variables for the years 1990-2010, I might have to calculate manufacturing's share of total employment in each year. I find it cumbersome to have to manually define a share for each year and
2003 May 20
2
Extending %*%
I have lists of matrices stored in various ways.  I'd like to extend
%*% to work on these.  Is this possible, or should I create my own new
operator?
A simplified example would be as follows:
A <- list( A1, A2, A3)
B <- list( B1, B2, B3)
where A1,...,B3 are all matrices, and I'd like A %*% B to return 
list( A1 %*% B1, A2 %*% B2, A3 %*% B3)
In the real case A and B are sometimes
2013 Apr 25
2
Decomposing a List
Greetings!
For some reason I am not managing to work out how to do this
(in principle) simple task!
As a result of applying strsplit() to a vector of character strings,
I have a long list L (N elements), where each element is a vector
of two character strings, like:
  L[1] = c("A1","B1")
  L[2] = c("A2","B2")
  L[3] = c("A3","B3")
 
2005 Jun 03
2
rearrange data
Dear all: 
I have this: 
A1 B1 C1 D1 E1 
A2 B2 C2 D2 E2 
A3 B3 C3 D3 E3 
And I want this 
A1 E1 
B1 E1 
C1 E1 
D1 E1 
A2 E2 
B2 E2 
C2 E2 
D2 E2 
A3 E3 
B3 E3 
C3 E3 
D3 E3 
Example: 
m<- matrix(1:15,nrow=3,byrow=T) 
m 
v<- unlist(list(t(m[,1:4]))) 
u<- rep(c(5,10,15),c(4,4,4)) 
data.frame(v,u) 
This is the result I want but I would like to learn a simpler way to do it. 
Any clue?
2013 Feb 07
1
Merging data in arrays
Dear All,
Here is a hypothetical sample (sorry for the clumsy code):
A1 <- matrix(1:5, nrow=5, ncol=1)
A2 <- matrix(6:10, nrow=5, ncol=1)
A3 <- matrix(11:15, nrow=5, ncol=1)
A4 <- matrix(16:20, nrow=5, ncol=1)
A5 <- matrix(21:25, nrow=5, ncol=1)
A6 <- matrix(26:30, nrow=5, ncol=1)
B1 <- matrix(c(A1, A2, A3), nrow=5, ncol=3)
B2 <- matrix(c(A2, A3, A4), nrow=5, ncol=3)
B3
2012 Oct 18
7
summation coding
I would like to code the following in R: a1(b1+b2+b3) + a2(b1+b3+b4) +
a3(b1+b2+b4) + a4(b1+b2+b3)
or in summation notation: sum_{i=1, j\neq i}^{4} a_i * b_i
I realise this is the same as: sum_{i=1, j=1}^{4} a_i * b_i - sum_{i=j} a_i
* b_i
would appreciate some help.
Thank you.
--
View this message in context: http://r.789695.n4.nabble.com/summation-coding-tp4646678.html
Sent from the R
2010 Jan 03
1
Anova in 'car': "SSPE apparently deficient rank"
I have design with two repeated-measures factor, and no grouping  
factor. I can analyze the dataset successfully in other software,  
including my legacy DOS version BMDP, and R's 'aov' function. I would  
like to use 'Anova' in 'car' in order to obtain the sphericity tests  
and the H-F corrected p-values.   I do not believe the data are truly  
deficient in rank. I
2004 Jul 08
2
Getting elements of a matrix by a vector of column indice s
See if the following helps:
> m <- outer(letters[1:5], 1:4, paste, sep="")
> m
     [,1] [,2] [,3] [,4]
[1,] "a1" "a2" "a3" "a4"
[2,] "b1" "b2" "b3" "b4"
[3,] "c1" "c2" "c3" "c4"
[4,] "d1" "d2" "d3" "d4"
[5,]
2005 Mar 23
1
nl regression with 8 parameters, help!
I'm doing a non linear regression with 8 parameters to be fitted:
J.Tl.nls<-nls(Gw~(a1/(1+exp(-a2*Tl+a3))+a4)*(b1/(1+exp(b2*Tl-b3))+b4),data=Enveloppe,
                       start=list(a1=0.88957,a2=0.36298,a3=10.59241,a4=0.26308,
                                 
b1=0.391268,b2=1.041856,b3=0.391268,b4=0.03439))
   First, I fitted my curve on my data by guessing the parameters'
2005 Aug 15
2
queer data set
I have a dataset that is basically structureless. Its dimension varies 
from row to row and sep(s) are a mixture of tab and semi colon (;) and 
example is
HEADER1 HEADER2 HEADER3   HEADER3
A1       B1      C1       X11;X12;X13
A2       B2      C2       X21;X22;X23;X24;X25
A3       B3      C3       
A4       B4      C4       X41;X42;X43
A5       B5      C5       X51
etc., say. Note that a blank