search for: grp3

Displaying 20 results from an estimated 20 matches for "grp3".

Did you mean: grp
2011 Feb 08
2
Convert the output of by() to a data frame
I'd like to summarize several variables in a data frame, for multiple groups, and store the results in a data.frame. To do so, I'm using by(). For example: df<-data.frame(a=1:10,b=11:20,c=21:30,grp1=c("x","y"),grp2=c("x","y"),grp3=c("x","y")) dfsum<-by(df[c("a","b","c")], df[c("grp1","grp2","grp3")], range) The result has a class of "by" and a mode of "list". I'm new to R and can't find any documentation on this cl...
2011 Apr 07
1
plyr workaround to converting by() to a data frame
Dear all Is there a clean plyr version of the following by() and do.call(rbind, ...) construct: > df<-data.frame(a=1:10,b=11:20,c=21:30,grp1=c("x","y"),grp2=c("x","y"),grp3=c("x","y")) > dfsum<-by(df[c("a","b","c")], df[c("grp1","grp2","grp3")], range) > as.data.frame(dfsum) Error in as.data.frame.default(dfsum) : cannot coerce class '"by"' into a data.frame &g...
2010 Aug 11
2
help to polish plot in ggplot2
Hi, I wanted to generate a plot which is almost like the plot generated by the following codes. category <- paste("Geographical Category", 1:10) grp1 <- rnorm(10, mean=10, sd=10) grp2 <- rnorm(10, mean=20, sd=10) grp3 <- rnorm(10, mean=15, sd=10) grp4 <- rnorm(10, mean=12, sd=10) mydat <- data.frame(category,grp1,grp2,grp3,grp4) dat.m <- melt(mydat) p <- qplot(1,value, data=dat.m, geom="bar", xlab="",ylab="Percentage of eco change",stat="identity",fill=v...
2007 Jul 19
3
Can I test if there are statistical significance between different rows in R*C table?
Dear friends, My R*C table is as follow: better good bad Goup1 16 71 37 Group2 0 4 61 Group3 1 6 57 Can I test if there are statistical significant between Group1 and Group2, Group2 and Group3, Group1 and Group2, taking into the multiple comparisons? The table can be set up using the following program: a<-matrix(data=c(16,71,37,0,4,61,1,6,57),nrow=3,byrow=TRUE) Thanks
2005 Oct 31
7
Downloading zip files
I have not had a great amount of success installing/updating packages from the "Packages" menu of Rgui under Windows XL. (Except for installing from loacal zip files.) But I am not asking for help in using these facilities because I prefer to keep a folder of package zip files. On the other hand I do find it tedious having to right-click "Save link as" on every individual
2017 Oct 27
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...cst+grp)^2 ,data=df)) print("Example 2.1: drop socst") print(model.matrix(~(socst+grp)^2 -socst ,data=df)) print("Example 2.2: drop grp") print(model.matrix(~(socst+grp)^2 -grp ,data=df)) This gives indeed the following regressors: "Full model" (Intercept) socst grp2 grp3 grp4 socst:grp2 socst:grp3 socst:grp4 "Example 2.1: drop socst" (Intercept) grp2 grp3 grp4 socst:grp1 socst:grp2 socst:grp3 socst:grp4 "Example 2.2: drop grp" (Intercept) socst socst:grp2 socst:grp3 socst:grp4 There is a little bit of R documentation about this, based on the co...
2017 Nov 02
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...gt; print(model.matrix(~(socst+grp)^2 -socst ,data=df)) >> print("Example 2.2: drop grp") >> print(model.matrix(~(socst+grp)^2 -grp ,data=df)) >> >> This gives indeed the following regressors: >> >> "Full model" >> (Intercept) socst grp2 grp3 grp4 socst:grp2 socst:grp3 socst:grp4 >> "Example 2.1: drop socst" >> (Intercept) grp2 grp3 grp4 socst:grp1 socst:grp2 socst:grp3 socst:grp4 >> "Example 2.2: drop grp" >> (Intercept) socst socst:grp2 socst:grp3 socst:grp4 >> >> There is a litt...
2017 Nov 04
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...; >> print("Example 2.2: drop grp") >> >> print(model.matrix(~(socst+grp)^2 -grp ,data=df)) >> >> >> >> This gives indeed the following regressors: >> >> >> >> "Full model" >> >> (Intercept) socst grp2 grp3 grp4 socst:grp2 socst:grp3 socst:grp4 >> >> "Example 2.1: drop socst" >> >> (Intercept) grp2 grp3 grp4 socst:grp1 socst:grp2 socst:grp3 socst:grp4 >> >> "Example 2.2: drop grp" >> >> (Intercept) socst socst:grp2 socst:grp3 socst:gr...
2017 Oct 31
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...ple 2.1: drop socst") > print(model.matrix(~(socst+grp)^2 -socst ,data=df)) > print("Example 2.2: drop grp") > print(model.matrix(~(socst+grp)^2 -grp ,data=df)) > > This gives indeed the following regressors: > > "Full model" > (Intercept) socst grp2 grp3 grp4 socst:grp2 socst:grp3 socst:grp4 > "Example 2.1: drop socst" > (Intercept) grp2 grp3 grp4 socst:grp1 socst:grp2 socst:grp3 socst:grp4 > "Example 2.2: drop grp" > (Intercept) socst socst:grp2 socst:grp3 socst:grp4 > > There is a little bit of R documentatio...
2011 Dec 12
2
Colours for sunflowerplot
...uot;","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov"," Dec"), tick = TRUE, line = NA) legend(7, 12.5, legend = c("Grp1"," Grp2"," Grp3"," Grp4"," Grp5"," Grp6"," Grp7"," Grp8"), col = c("blue","brown","orange","green","red","lightblue","purple","pink"), pch = 19, bty = "n") For...
2017 Nov 06
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...t;> >> >> print(model.matrix(~(socst+grp)^2 -grp ,data=df)) >> >> >> >> >> >> This gives indeed the following regressors: >> >> >> >> >> >> "Full model" >> >> >> (Intercept) socst grp2 grp3 grp4 socst:grp2 socst:grp3 socst:grp4 >> >> >> "Example 2.1: drop socst" >> >> >> (Intercept) grp2 grp3 grp4 socst:grp1 socst:grp2 socst:grp3 >> >> >> socst:grp4 >> >> >> "Example 2.2: drop grp" >> &gt...
2017 Nov 02
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...^2 -socst ,data=df)) > >> print("Example 2.2: drop grp") > >> print(model.matrix(~(socst+grp)^2 -grp ,data=df)) > >> > >> This gives indeed the following regressors: > >> > >> "Full model" > >> (Intercept) socst grp2 grp3 grp4 socst:grp2 socst:grp3 socst:grp4 > >> "Example 2.1: drop socst" > >> (Intercept) grp2 grp3 grp4 socst:grp1 socst:grp2 socst:grp3 socst:grp4 > >> "Example 2.2: drop grp" > >> (Intercept) socst socst:grp2 socst:grp3 socst:grp4 > >>...
2004 Nov 29
2
[BASIC] Solution of creating a sequence of object names
...() # create the list > for (i in 1:10) Result[[paste("GRP", i, sep='')]] <- runif(5) # store each result > Result # print out the data $GRP1 [1] 0.2655087 0.3721239 0.5728534 0.9082078 0.2016819 $GRP2 [1] 0.89838968 0.94467527 0.66079779 0.62911404 0.06178627 $GRP3 [1] 0.2059746 0.1765568 0.6870228 0.3841037 0.7698414 $GRP4 [1] 0.4976992 0.7176185 0.9919061 0.3800352 0.7774452 $GRP5 [1] 0.9347052 0.2121425 0.6516738 0.1255551 0.2672207 $GRP6 [1] 0.38611409 0.01339033 0.38238796 0.86969085 0.34034900 $GRP7 [1] 0.4820801 0.5995658 0.4935413 0.1862176 0.8273...
2017 Nov 04
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...2.2: drop grp") > >> >> print(model.matrix(~(socst+grp)^2 -grp ,data=df)) > >> >> > >> >> This gives indeed the following regressors: > >> >> > >> >> "Full model" > >> >> (Intercept) socst grp2 grp3 grp4 socst:grp2 socst:grp3 socst:grp4 > >> >> "Example 2.1: drop socst" > >> >> (Intercept) grp2 grp3 grp4 socst:grp1 socst:grp2 socst:grp3 > socst:grp4 > >> >> "Example 2.2: drop grp" > >> >> (Intercept) socst socst...
2011 Feb 14
5
Transforming relational data
Hi, I have a large dataset with info on individuals (B) that have been involved in projects (A) during multiple years (C). The dataset contains three columns: A, B, C. Example: A B C 1 1 a 1999 2 1 b 1999 3 1 c 1999 4 1 d 1999 5 2 c 2001 6 2 d 2001 7 3 a 2004 8 3 c 2004 9 3 d 2004 I am interested in how well all the individuals in a project know each other. To
2017 Nov 06
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...print(model.matrix(~(socst+grp)^2 -grp ,data=df)) > >> >> >> > >> >> >> This gives indeed the following regressors: > >> >> >> > >> >> >> "Full model" > >> >> >> (Intercept) socst grp2 grp3 grp4 socst:grp2 socst:grp3 socst:grp4 > >> >> >> "Example 2.1: drop socst" > >> >> >> (Intercept) grp2 grp3 grp4 socst:grp1 socst:grp2 socst:grp3 > >> >> >> socst:grp4 > >> >> >> "Example 2.2: drop gr...
2009 Oct 15
1
Sampling procedure
I would like to divide a vector in 9 groups in a way that each number is present in only one group. In a vector of 783 I would like to divide in 9 different groups of 87 Example <- matrix(c(1:783),ncol = 1) s1 <- as.matrix(sample(Example,87, re = FALSE)) Example <- Example[-s1] s2 <- as.matrix(sample(Example,87, re = FALSE)) #however I don?t know how to remove the second group from
2008 Oct 26
0
LMER quasibinomial
...-0.3807 0.1622 -2.348 Correlation of Fixed Effects: (Intr) capcty group2 group3 cpct:2 capacity -0.322 group2 -0.709 0.228 group3 -0.708 0.228 0.502 capcty:grp2 0.235 -0.730 -0.310 -0.167 capcty:grp3 0.233 -0.725 -0.166 -0.305 0.529 --------- Results 2 --------- Generalized linear mixed model fit by the Laplace approximation Formula: entryprob.bind ~ capacity * factor(group) + (1 | subject) Data: res Subset: c(which(is.na(entryprob) == FALSE) & combination == "gnl")...
2011 Jun 17
4
profile plot in R
Hi friends, I have a matrix with following format. group var1 var2 .......varN c1 group1 1.2399 1.4990....-1.4829 c2 group4 0.8989 0.7849.....1.8933 ... ... c100 group10 ..... I want to draw a profile plot of each condition c1 to c100, which rows in above matrix and each line representing a row should be uniquely colored according to the group(1 to 10). I think this is simple task
2008 Jul 07
1
GLM, LMER, GEE interpretation
...-0.3807 0.1622 -2.348 Correlation of Fixed Effects: (Intr) capcty group2 group3 cpct:2 capacity -0.322 group2 -0.709 0.228 group3 -0.708 0.228 0.502 capcty:grp2 0.235 -0.730 -0.310 -0.167 capcty:grp3 0.233 -0.725 -0.166 -0.305 0.529 ----- GEE ----- GEE: GENERALIZED LINEAR MODELS FOR DEPENDENT DATA gee S-function, version 4.13 modified 98/01/27 (1998) Model: Link: Logit Variance to Mean Relation: Binomial Correlation Structure: Unstructured Call: ge...