Displaying 20 results from an estimated 45 matches for "tstats".
Did you mean:
stats
2011 Dec 31
2
Very strange function() behaviour.
Hi, R newb here. I've coded a function that inputs N dimensional array(s) [or
class=numeric if it's dim=1] of coefficients and tstats, where
dim(coef_matrix)=dim(tstat_matrix), it will then output a same dimension
matrix of coefficients pasted to tstats in brackets pasted to significance
stars.
If I go straight to the code INSIDE the function, it works 100% as it's
supposed to. The output matrix has the correct dimensions. H...
2010 May 24
2
adding one line to a plot
Hello!
I am running a very simple mini Monte-Carlo below using the function
tstatistic (right below this sentence):
tstatistic = function(x,y){
m=length(x)
n=length(y)
sp=sqrt( ((m-1)*sd(x)^2 + (n-1)*sd(y)^2)/(m+n-2) )
t=(mean(x)-mean(y))/(sp*sqrt(1/m+1/n))
return(t)
}
alpha=.1; m=10; n=10 # sets alpha, m, n - for run 1
N=10000 # sets the number of simulations
n.reject=0 # counter of num.
2005 Apr 05
2
Stats Question: Single data item versus Sample from Norma l Distribution
Here's one possibility, assuming muhat and sigmahat are estimtes of mu and
sigma from N iid draws of N(mu, sigma^2):
tStat <- abs(x - muhat) / sigmahat
pValue <- pt(tStat, df=N, lower=TRUE)
I'm not quite sure what df tStat should have (exercise for math stat), but
given fairly large N, that should make little difference.
Andy
> From: Ross Clement
>
> Hi. I have a
2006 Jul 16
2
Matrices given to pt? [was: [R] for loops and counters]
Hi, people.
I was a bit intrigued by the message quoted below. Indeed, if pt() is
given a matrix, it returns a matrix. Should this feature be documented?
?pt speaks about "a vector of quantiles", and says nothing about the
type of what it returns.
The same might presumably apply to other distribution-related functions.
----- Forwarded message from Martyn Plummer <plummer at
2013 May 16
2
[PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool
...struct rtnl_link_stats64 *tot)
{
struct virtnet_info *vi = netdev_priv(dev);
- int cpu;
+ int i;
unsigned int start;
- for_each_possible_cpu(cpu) {
- struct virtnet_stats *stats = per_cpu_ptr(vi->stats, cpu);
+ for (i = 0; i < vi->max_queue_pairs; i++) {
+ struct virtnet_tx_stats *tstats = &vi->sq[i].stats;
+ struct virtnet_rx_stats *rstats = &vi->rq[i].stats;
u64 tpackets, tbytes, rpackets, rbytes;
do {
- start = u64_stats_fetch_begin_bh(&stats->tx_syncp);
- tpackets = stats->tx_packets;
- tbytes = stats->tx_bytes;
- } while (u64_stats_...
2013 May 16
2
[PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool
...struct rtnl_link_stats64 *tot)
{
struct virtnet_info *vi = netdev_priv(dev);
- int cpu;
+ int i;
unsigned int start;
- for_each_possible_cpu(cpu) {
- struct virtnet_stats *stats = per_cpu_ptr(vi->stats, cpu);
+ for (i = 0; i < vi->max_queue_pairs; i++) {
+ struct virtnet_tx_stats *tstats = &vi->sq[i].stats;
+ struct virtnet_rx_stats *rstats = &vi->rq[i].stats;
u64 tpackets, tbytes, rpackets, rbytes;
do {
- start = u64_stats_fetch_begin_bh(&stats->tx_syncp);
- tpackets = stats->tx_packets;
- tbytes = stats->tx_bytes;
- } while (u64_stats_...
2005 Mar 03
2
reading row vectors from file
...1,2,3,4,5,6,7,8,9,16,17,18,19,20,...
noise,49,47,48,48,50,47,48,47,46,50,48,54,49,47,49,...
signal,99,0,100,0,0,100,0,100,100,0,100,101,100,0,0,...
pctrcv,5,0,5,0,0,5,0,5,11,0,5,5,5,0,0,...
I can transpose the data file (e.g., using an awk script), and then read
it using read.csv("tstats"),
$ transpose /tmp/stats > /tmp/tstats
$ cat /tmp/tstats
freq,noise,signal,pctrcv
0,49,99,5
1,47,0,0
2,48,100,5
...
but would prefer to import the line-oriented files directly. I've
drawn a blank after perusing help, documentation, google searches, etc.....
1999 Oct 05
2
for loops and counters
I am trying to assign values to a vector (pvalue). Similar code works in C
but not in R. What am I doing wrong?
r <- pvalue <- 0
for(i in (1:(k-1))){
for(j in (i+1):k){
r <- r+1
tstat <- (means[i]-means[j])/rms
pvalue[r] <- 2*(1-pt(abs(tstat),df))
}
}
Thank you.
Peter B.
--
Peter B. Mandeville mandevip at deimos.tc.uaslp.mx
Jefe del
2004 Feb 14
6
Beginner's question about t.test()
Dear All,
I am doing some exercise in statistics textbook on comparison of two
experimental means. Is it possible to use t.test() do t-test when I have
only two means, sample size, two standard deviations ? (no raw data).
Thanks.
Pramote
2011 Apr 19
0
doSMP package works better than perfect, at least sometimes.
...,list(g=times$g, n=times$n, method=times$method)
,mean, na.rm=TRUE
)
,by=c('g','n','method')
)
# transpose to wide
mm <- melt(stats, id=c('g','n','method'))
tstats <- dcast(mm, g + n ~ variable+method)
tstats$speedup.elapsed1 <- tstats$meanElapsed_unvectorized /
tstats$meanElapsed_1CoreVectorized
tstats$speedup.elapsed3 <- tstats$meanElapsed_1CoreVectorized /
tstats$meanElapsed_SMPVectorized
speedupVectorizing <- dcast(tstats[c('g...
1998 Feb 19
1
R-beta: t.test
As a very new user of R, and a user of S with very
limited experience, I thought I would start humbly
with a simple t.test.
The response to the command sequence
sample <- scan()
4 5 6 7 8 9
t.test(sample,mu=20)
rather surprised me, because of the idiosyncratic
choice of a confidence interval for the mean of the
population from which the sample was drawn. I asked
my colleague Bob Henery
2008 Mar 10
1
ltm package question
Hello All,
I was wondering how I can get the overall Pearson chi^2 test of model fit
with its df and p value in the LTM package for the 2PL models.
Thanks,
--
Davood Tofighi
Department of Psychology
Arizona State University
[[alternative HTML version deleted]]
2012 Mar 31
2
lm no calcula un coeficiente
Hola,
quiero hacer una regresión lineal
lm(y ~ x * grupo, data =datos)
y: numérica, x: numérica, grupo: factor con dos niveles (1 y 2)
pero no calcula el coeficiente de x:grupo2 a cuenta de una singularidad
Coefficients: (1 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.283e+06 2.276e+04 -56.359 < 2e-16 ***
x
2011 Jun 20
1
requesting a mentor for R development
I'd like to learn the process of revising R functions & packages and
then submitting proposed patches to the R Core team. Would someone be
willing to mentor me through one example?
For starters, consider an example. I'd like to revise the t.test
function to return the stderr value to the user. We only need to
change the "rval" in the third-from-the end line of
2012 Apr 19
1
Performing repeated T tests in R
I need to perform 10000 T tests
#I have two populations with different means
Popc1<-rnorm(100000,10,2)
Popc2<-rnorm(100000,8,2)
#I created two sets of samples - each set has 10000 samples, and I made a
matrix of 20 rows and 10000 columns to fit the data
sampc1<-matrix(,20,10000)
for(j in 1:10000){sampc1[1:20,j]<-sample(Popc1,20)}
sampc2<-matrix(,20,10000)
for(j in
1998 Feb 22
0
R-beta: t.test in R
RE t.test in R
I objected a day or two ago to the behaviour of the one-sample t.test in R
where it is easy to generate a "confidence interval" for the mean of the
population
which does not contain the sample mean, in the case where the null
hypothesis is
rejected. It now appears that the same behaviour is latent in the code for
the two-sample version of this test. The relevant lines
2009 Mar 29
2
Compiler options for Makefile.win
Dear all,
For certain reasons I have to compile the source code of my package on
Windows XP using Microsoft Visual Studio 9.0, thus I had to create a
"Makefile.win". Now I have a question regarding compiler options /MT vs
/MD for Makefile.win.
The following partial output shows that when building my package on
Windows XP using "R CMD build --binary xps" with compiler
2001 Nov 27
3
Equations as arguments to functions
I am trying to pass an equation as an arguement to a function, which seems
pretty straightforward given lazy evaluation.
I constructed the following little test to make sure I sort of knew what I
was doing:
go <- function(X,eq) { C <<- X*2; d <<- eq}
a _ rnorm(100)
go(10,eq=a[.5*length(a)]+C+1)
> C
[1] 20
> d
[1] 21.10551
> a[.5*length(a)]
[1] 0.1055086
Everything
2006 Sep 27
3
t-stat Curve
Number of subjects = 25
Mean of Sample = 77
Standard Deviation (s) = 12
sem = 2.4
df = 24
The claim is that population mean is less than 80
* > 80
So our H0 (null hupotheis) is * > 80
> qt(.95,24)
[1] 1.710882
> qt(0.05, 24)
[1] -1.710882
tstat = -1.25 on t24 falls between 1.711 (.95,24) and *1.711 (.005,24)
How Could I sketch t curve for the above data where my * would be at the
2004 Feb 27
3
How to recover t-statistics?
Hi!
I'm doing Monte Carlo analyses of the distribution
of the t-statistics of the parameters of models evaluated
with the lm( ) function.
Is there an easy way to recover the t-statistics
(similarly to using coef to recover the coefficients)?
Thanks,
joseph
---------------------------------
[[alternative HTML version deleted]]