search for: score2

Displaying 12 results from an estimated 12 matches for "score2".

Did you mean: scores
2010 Jul 28
1
specifying an unbalanced mixed-effects model for anova
...ing trouble using lme to specify a mixed effects model. i'm pretty sure this is quite easy for the experienced anova-er, which i unfortunately am not. i have a data frame with the following columns: col 1 : "Score1" (this is a continuous numeric measure between 0 and 1) col 2 : "Score2" (another continuous numeric measure, this time bounded between 0 and 100) col 3 : "Class" (a fixed-effects factor with 4 (ordered) levels) i have ~2000 observations, but unbalanced w.r.t. the "Class" factor. each observation has a distinct "Score1" and "Sco...
2006 Nov 25
3
Multiple Conditional Tranformations
...#Create score1 so that it differs for males and females: mydata$score1 <- ifelse( mydata$gender=="f" , (mydata$score1 <- (2*mydata$q1)+mydata$q2), ifelse( mydata$gender=="m", (mydata$score1 <- (3*mydata$q1)+mydata$q2), NA ) ) mydata #Create score2 so that it too differs for males and females: mydata$score2 <- ifelse( mydata$gender=="f" , (mydata$score2 <- (2.5*mydata$q1)+mydata$q2), ifelse( mydata$gender=="m", (mydata$score2 <- (3.5*mydata$q1)+mydata$q2), NA ) ) mydata Thanks! Bob =...
2010 Oct 20
1
Adding Legend about two quantile lines at ggplot
Hi, all. I'd like to add legend on my graph but I can't. My code is follows. library(ggplot2) score1<-rnorm(100,0,5) score2<-rnorm(400,10,15) mydata<-data.frame(score1,score2) ggplot(mydata,aes(y=score2,x=score1))+geom_point()+stat_quantile(quantiles=c(0.50),col="red")+stat_quantile(quantiles=c(0.90),col="blue",size=2) I like to add legend indicating the information of "thick-blue line =...
2010 Aug 04
4
Passing the name of a variable to a function
...given dataframe d, and the other variables needed, T, M and so on, are to be found in the same dataframe :- pf <- function (y,data,...) { p1 <- xyplot(y~x|T,data) p2 <- xyplot(y~x|T,subset(data,M == 2)) p3 <- xyplot(y~x|T,subset(data,M == 4)) #print(p1,p2,p3....) } pf(Score1,data) pf(Score2,data) This fails, because, of course, Score 1, Score 2 etc.. are not defined, or if you pass them as pf(data$Score2,data), then when you subset the data, data$Score2 is now the wrong shape. I've come up with various inelegant hacks, (often with for loops), for getting around this over the l...
2010 Apr 26
1
Help with replacement of certain values in dataset with SAS code equivalent
...for Multiple Conditional Transformations. # Read the file into a data frame and print it. load(file="c:\\mydata.Rdata") print(mydata) # Use column bind to add two new columns to mydata. # Not necessary for this example, but handy to know. mydata <- cbind(mydata, score1 = 0, score2 = 0) attach(mydata) mydata$guys <- gender=="m" #Creates a logical vector for males. mydata$gals <- gender=="f" #Creates another for females. print(mydata) # Applies basic math to the group selected by the logic. mydata$score1[gals]<- 2*q1[gals] + q2[gals]...
2012 Jun 01
2
how to add a 'label' column
...ro 0.18631 0.16128 0.14477 0.16024 0.14063 0.25915 0.19108 10 rt 0.14805 0.15794 0.13665 0.15767 0.13904 0.19171 0.15511 11 sc 0.15510 0.16374 0.16654 0.16864 0.14216 0.20595 0.16847 12 yk 0.18077 0.17320 0.19948 0.15941 0.14053 0.23372 0.18398 Then, I stacked them score2=stack(score); values ind 1 0.17687 test1 2 0.18020 test1 3 0.14269 test1 4 0.14626 test1 5 0.16850 test1 6 0.13741 test1 7 0.14548 test1 8 0.16246 test1 9 0.18631 test1 10 0.14805 test1 11 0.15510 test1...
2010 Apr 26
1
help with code
...for Multiple Conditional Transformations. # Read the file into a data frame and print it. load(file="c:\\mydata.Rdata") print(mydata) # Use column bind to add two new columns to mydata. # Not necessary for this example, but handy to know. mydata <- cbind(mydata, score1 = 0, score2 = 0) attach(mydata) mydata$guys <- gender=="m" #Creates a logical vector for males. mydata$gals <- gender=="f" #Creates another for females. print(mydata) # Applies basic math to the group selected by the logic. mydata$score1[gals]<- 2*q1[gals] + q2[gals]...
2010 Apr 16
4
score counts in an aggregate function
Dear R-Users, I have a big data set "mydata" with repeated observation and some missing values. It looks like the format below: userid sex item score1 score2 1 0 1 1 1 1 0 2 0 1 1 0 3 NA 1 1 0 4 1 0 2 1 1 0 1 2 1 2 NA 1 2 1 3 1 NA 2 1 4 NA 0 3 0 1 1...
2010 Feb 25
2
Restructure some data
...:10, sep = "") set.seed(54321) dat <- data.frame(id = c(1,2,3,4,5), first.item = sample(item.pool, 5, replace=TRUE), second.item = sample(item.pool, 5,replace=TRUE), third.item = sample(item.pool, 5,replace=TRUE), score1 = sample(c(0,1), 5,replace=TRUE), score2 = sample(c(0,1), 5,replace=TRUE), score3 = sample(c(0,1), 5,replace=TRUE)) I need to restructure this into a new format. The new matrix df (after the loop) is exactly what I want in the end. But, I'm annoyed at myself for not thinking of a more efficient way to restructure this without using a...
2012 Jun 02
2
How can I export a paired t-test output table to an excel file?
Hi R users, Could anyone let me know how to export a paired t-test output table (see below) to an excel file? Jason, with(score2,pairwise.t.test(values,ind, + p.adjust.method="holm", paired=T)) Pairwise comparisons using paired t tests data: values and ind test1 test2 test3 test4 test5 test6 test1 1.0000 - - - - - test2 1.0000...
2010 Jan 20
3
Mutliple sets of data in one dataset....Need a loop?
Hi I'm hoping someone can help me I am a relative newbie to R. I have data that is in a similar format to this... Experiment Score1 Score2 X -0.85 -0.02 X -1.21 -0.02 X 1.05 0.09 Y -1.12 -0.07 Y -0.27 -0.07 Y -0.93 -0.08 Z 1.1 -0.03 Z 2.4 0.09 Z -1.0 0.09 Now I can easily have a look at the overall correlation of score 1 and 2 by doing this plot(data[,2], data[,3]) or fit <- lm(data[,2] ~ data[,3] BUT! I really want to look a...
2008 Jan 05
4
a sort question
...able to figure this out could someone help me out here and give me an example on how to solve this def self.top3 geslacht per_geslacht(geslacht).sort_by { |x| x.score }.to_a.slice(-3,3).reverse end when it''s an if structure I should start somehow with if speler.score1 > speler.score2 print speler.score1 else print speler.score2 but after this I,m lost since I don''t know how to difference the first person from the second thanks for your help and feedback Paul -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received...