search for: score1

Displaying 14 results from an estimated 14 matches for "score1".

Did you mean: scores
2006 Nov 25
3
Multiple Conditional Tranformations
...("id,group,gender,q1,q2,q3,q4 01,1,f,2,2,5,4 02,2,f,2,1,4,5 03,1,f,2,2,4,4 04,2,f,1,1,5,5 05,1,m,4,5,4, 06,2,m,5,4,5,5 07,1,m,3,3,4,5 08,2,m,5,5,5,4") mydata<-read.table(textConnection(mystring),header=TRUE,sep=",",row.name s="id") mydata #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...
2010 Jul 28
1
specifying an unbalanced mixed-effects model for anova
hi all - i'm having 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 "Cl...
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 o...
2010 Aug 04
4
Passing the name of a variable to a function
...a variable in a 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...
2010 Apr 26
1
Help with replacement of certain values in dataset with SAS code equivalent
...# R Program 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...
2007 Sep 17
2
What's the corresponding function in R for lo() function in S-PLUS?
Dear friends, In S-PLUS, we can use the following argument, but not in R. mode12 <- gam(score1 ~ lo(latitude) + lo(longitude)) I searched the help in S-PLUS, it says lo() Allows the user to specify a Loess fit in a GAM formula, but i didn't find the correponding function in R. Anybody knows how to do the similar task in R? Thanks very much. -- With Kind Regards, oooO::::::::: (..):...
2010 Apr 26
1
help with code
...# R Program 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...
2007 Dec 19
2
Question about which kind of plot to use
...is shown below. Score 1 Mean SD B M T B M T V 86.9 13.0 88.8 16.9 2.0 10.5 W 16.1 96.1 17.7 2.2 4.6 1.7 X 50.7 61.1 74.7 4.7 3.7 7.6 Y 68.5 99.7 37.6 6.0 8.0 2.3 Z 92.7 22.3 69.4 6.5 1.2 2.2 What I did before was a standard mean plot: plotMeans(w$score1, w$Factor, error.bars="sd",xlab="Factor",ylab="Score",main="Group W Score 1 Plot") However, with 15 groups and 5 scores this turns into 75 individual graphs. Is there a way to layer mean plots? Or show several mean plots in the Same graph? Any ideas or s...
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...
2010 Feb 25
2
Restructure some data
...item.pool <- paste("item", 1: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 efficien...
2009 Sep 08
1
Derivative of nonparametric curve
...on. For instance, if we run the R script below, a smooth nonparametric regression curve is produced. provide.data(trawl) Zone92?? <- (Year == 0 & Zone == 1) Position <- cbind(Longitude - 143, Latitude) dimnames(Position)[[2]][1] <- "Longitude - 143" sm.regression(Longitude, Score1, method = "aicc", col = "red",? model = "linear") Could someone please give some hints?on the way to?find the derivative?on the curve at?some points ? Thank you. Kagba
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...
2008 Jan 05
4
a sort question
...bubble sort but not 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/. --~--~---------~--~----~------------~-------~--~...
2009 Sep 08
1
[OT] "_" inserted in postings
...on. For instance, if we run the R script below, a smooth nonparametric regression curve is produced. provide.data(trawl) Zone92__ <- (Year == 0 & Zone == 1) Position <- cbind(Longitude - 143, Latitude) dimnames(Position)[[2]][1] <- "Longitude - 143" sm.regression(Longitude, Score1, method = "aicc", col = "red",_ model = "linear") Could someone please give some hints_on the way to_find the derivative_on the curve at_some points ? Thank you. Kagba ================================================ In the message headers I see: Content-Type: te...