Displaying 6 results from an estimated 6 matches for "a2b1".
Did you mean:
62b1
2012 Sep 14
4
concatenating two vectors
Dear all,
I want to concatenate the elements of two vectors such as
a<-c("a1","a2")
b<-c("b1","b2")
and obtain
"a1b1", "a1b2","a2b1","a2b2"
I tried the paste and paste0 functions, but they yielded elementwise
concatenation such as
"a1b1","a2b2"
I am wondering that is there an efficient way of doing my wish, for instance
without using for loop etc.
Best
Ozgur
--
View this message in co...
2009 Jan 30
2
reshape with two time variables
I have a data frame in wide format that I'd like to convert to long format.
For example, in wide format I have:
id A1B1 A1B2 A2B1 A2B2
1 1 400 475 420 510
2 2 390 500 470 472
3 3 428 512 555 610
4 4 703 787 801 822
5 5 611 634 721 705
6 6 543 522 612 788
7 7 411 488 506 623
8 8 654 644 711 795
A is one repeated-measures variable with levels 1 and 2. B is a second
repeated-measures variable also with levels 1 and 2. I'd l...
2010 Jan 03
1
Anova in 'car': "SSPE apparently deficient rank"
...ing to convert my own similar course to R for my students
for next fall. I have been successful at analyzing a segment of the
data as a 2-way repeated measures design.
Here is my code:
> your.data=read.table(pipe("pbpaste"),header=T)
> your.data
partic A1B1 A1B2 A1B3 A1B4 A2B1 A2B2 A2B3 A2B4 A3B1 A3B2 A3B3 A3B4
1 p1 1 1 2 3 1 2 4 7 1 3 7 10
2 p2 2 2 3 3 2 2 5 6 2 4 6 9
3 p3 1 2 2 3 2 3 2 6 1 4 7 9
4 p4 1 1 2 2 1 2 3 6 2...
2012 Mar 21
2
Type II and III sum of squares (R and SPSS)
...of the linear and quadratic contrast between the levels of
the within factor.
Below I report the list of commands used in R ("fattA" is the beteween
factor and "fB" is the within factor):
> a1b1<-c(10,9,8,7)
> a1b2<-c(7,6,4,5)
> a1b3<-c(3,2,3,4)
> a2b1<-c(9,9,8,7)
> a2b2<-c(8,7,9,7)
> a2b3<-c(7,8,8,6)
>
> M3<-matrix(0,8,4)
> M3[,1]<-cbind(a1b1,a2b1)
> M3[,2]<-cbind(a1b2,a2b2)
> M3[,3]<-cbind(a1b3,a2b3)
> M3[,4]<-rep(c(1,2),each=4)
>
> colnames(M3)<-c("b1","b2",...
2010 Jul 02
4
Some questions about R's modelling algebra
Hi all,
In preparation for teaching a class next week, I've been reviewing R's
standard modelling algebra. I've used it for a long time and have a
pretty good intuitive feel for how it works, but would like to
understand more of the technical details. The best (online) reference
I've found so far is the section in "An Introduction to R"
2004 Jun 15
4
"Glueing" factors together
Hi folks,
Suppose I have a series of cases each with categorical
factors A, B.
What is the best way to "glue" A and B together into a single
factor? For example, given
A0 B1 ...
A1 B1 ...
A0 B2 ...
A1 B0 ...
A0 B0 ...
A1 B2 ...
then I'd like to end up with a single factor with levels
A0B0, A0B1, A0B2, A1B0, A1B1, A1B2
according to all the combinations which actually occur in