Displaying 9 results from an estimated 9 matches for "testscore".
Did you mean:
testscores
2005 Dec 21
7
use of SET command in find_by_sql
Hi,
I''m trying to execute something like this method in a model:
def self.sql_for_rankings()
sql = "SET @counter:=0;"
sql << " SET @counter:=0;
SELECT *, @counter:=@counter+1 AS rank
FROM testscores. "
find_by_sql(sql)
end
Where the new rank column is a kind of autoincrementer inside of this query.
Ignore for the moment that I can add this counter in ruby rather than in sql
- but I am trying to do it in mysql. This executes in mysql with no problem
and returns something like...
2007 Aug 20
1
rv package, rvnorm function
...Pasted below, in case it is useful, is my R file:
****R file begins here **************************
# This is a file of R commands to test Kerman and Gelman's package rv.
# It is based on their "Using Random Variables to Manipulate and
# Summarize Simulations in R,", July 4, 2007.
testscores <- read.table("rv_data.txt",header=TRUE) # Extract data.
attach(testscores) # Put testscores in R search path
testscores[1:2,] # Print first 2 observations
testscores[14:15,] # Print last 2 observations
x <- testscores[,1] # midterm scores
y <- testscores[,2] # final exam...
2001 Aug 17
2
Principle Component Analysis
...40 32
20 59 72 70 66 62
21 28 50 50 42 63
22 19 46 49 40 30
23 36 56 56 54 52
24 54 57 59 62 58
25 14 35 38 29 20
> summary(testscores.prc)
Importance of components:
Comp.1 Comp.2 Comp.3 Comp.4
Comp.5
Standard deviation 28.4896795 9.03547104 6.60095491 6.13358179
3.72335754
Proportion of Variance 0.8212222 0.08260135 0.04408584 0.03806395
0.01402668
Cumulative Proportion 0.8212222 0.9...
2006 Apr 13
1
Subset rows over multiple columns
...nvision doing is using the reshape option such that
itd_1 and itd_45 would be in the "long" format. This would cause for
itd_1 and itd_45 to be stacked in a single column as well as righta_a
and righta_b and then I could then use tapply and get what I need
without any subsetting. That is
testScores <- reshape(tt, idvar='id', varying=list(c('itd_1', 'itd_45'),
c('righta_a', 'righta_b')), v.names=c('item','answer'),
timevar='item_position', direction='long')
with(testScores, tapply(answer, item, mean))
Or I could get...
2005 Dec 26
2
resorting a dataset
Quick question to see how I might re-sort an Activerecord data set. Let''s
say I have this table:
tablename: testscores
| id | student | score | avg_for_year
1, steve, 85, 82
2, tom, 84, 92,
3, jim, 92, 95
In my controller, I have something like:
t= Testscores.find(:all, :order => "score DESC", :limit => 2)
...where it would return the records for Jim and Steve....
My question is:
Is it possible...
2008 Jun 17
3
rindex not working with objects from db model
I''m sorting a separate list that doesn''t contain a certain user''s
attribute, but trying to but that certain user''s attribute on the
separate percentile.
test_scores = Testscore.find(:all, :conditions=> {...})
my_testscore = current_user.test_score
my_ts = Testscore.new(:score => my_testscore)
test_scores.push(ts)
sorted_ts = test_scores.sort {|x,y| x.score <=> y.score }
index_one = sorted_ts.index(my_ts)
# why doesn''t this work?
index_two = sorted...
2011 Mar 10
0
confidence intervals when using polr()
...al="confidence",
level=.095 and then interval = "prediction". Below is a sample of my data
and my code I am trying to run (its from an open access public data set; I
tried to make the size as small as possible, sorry for its length).
polr.result<-polr(ordered(tvwatch)~ses+testscores,method="probit",Hess =
T,data=testdata)
polr.predict<-predict(polr.result,type="probs",interval="confidence",level=.
95)
structure(list(tvwatch = c(2L, 2L, 1L, 4L, 2L, 4L, 3L, 2L, 3L,
2L, 3L, 4L, 4L, 3L, 4L, 3L, 2L, 1L, 3L, 1L, 2L, 3L, 4L, 4L, 1L,
1L, 2L,...
2009 Dec 15
2
[PATCH 1/2] drm/nouveau: Kill global state in NvShadowBIOS
...alse },
{ "PCIROM", load_vbios_pci, true },
- { }
};
+#define METHODCNT 3
+
static bool NVShadowVBIOS(struct drm_device *dev, uint8_t *data)
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
- struct methods *methods, *method;
+ struct methods *methods;
+ int i;
int testscore = 3;
+ int scores[METHODCNT];
if (nouveau_vbios) {
- method = nv04_methods;
- while (method->loadbios) {
- if (!strcasecmp(nouveau_vbios, method->desc))
+ methods = nv04_methods;
+ for (i = 0; i < METHODCNT; i++)
+ if (!strcasecmp(nouveau_vbios, methods[i].desc))
break;
-...
2013 Feb 19
2
Cramer von Mises test for a discrete distribution
Hi,
?
I'm trying to carry out Cramer von Mises tests between pairs of vectors belonging to a discrete distribution (concretely frequencies from 0 to 200). However, the program crashes in the attempt. The problem seems to be that these vectors only have positive integer numbers (+ zero). When I add a random very small positive decimal to the non-decimal part everything works fine (files prm1