similar to: Performing repeated T tests in R

Displaying 20 results from an estimated 100 matches similar to: "Performing repeated T tests in R"

2012 Apr 19
1
Performing t tests between matrices
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
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
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
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
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
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
2005 Aug 18
2
Monitoring RTP protocol
Hi all, is it possible to monitor RTP protocol (latency, errors, ...) by Asterisk or other software. Thanks for answer, Bob.
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]]
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
2004 Nov 24
3
T-test syntax question
Hi. I'd like to do a t-test to compare the Delta values of items with Crit=1 with Delta values of items with Crit=0. What is the t.test syntax? It should produce a result like this below (I can't get in touch with the person who originally did this for me) Welch Two Sample t-test data: t1$Delta by Crit t = -3.4105, df = 8.674, p-value = 0.008173 alternative hypothesis: true
2006 Jun 25
1
analyze summary data
Hello! I would like to ask the list a question, as I could not find the answer in online material as well as several books. I do have summary data (mean, standard deviation and sample size n) and want to analyze this data. The summary data is supposed to be from a normal distribution. I need the following calculations on this summary data (no, I do not have the original data): - one
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
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
2011 Aug 05
2
Which is more efficient?
Greetings all, I am curious to know if either of these two sets of code is more efficient? Example1: ## t-test ## colA <- temp [ , j ] colB <- temp [ , k ] ttr <- t.test ( colA, colB, var.equal=TRUE) tt_pvalue [ i ] <- ttr$p.value or Example2: tt_pvalue [ i ] <- t.test ( temp[ , j ], temp[ , k ], var.equal=TRUE) ------------- I have three loops, i, j, k. One to test the all of
2009 Jan 27
3
How to compare two regression line slopes
Hi, I've made a research about how to compare two regression line slopes (of y versus x for 2 groups, "group" being a factor ) using R. I knew the method based on the following statement : t = (b1 - b2) / sb1,b2 where b1 and b2 are the two slope coefficients and sb1,b2 the pooled standard error of the slope (b) which can be calculated in R this way: > df1 <-
2023 Aug 20
3
Issues when trying to fit a nonlinear regression model
Dear friends, This is the dataset I am currently working with: >dput(mod14data2_random) structure(list(index = c(14L, 27L, 37L, 33L, 34L, 16L, 7L, 1L, 39L, 36L, 40L, 19L, 28L, 38L, 32L), y = c(0.44, 0.4, 0.4, 0.4, 0.4, 0.43, 0.46, 0.49, 0.41, 0.41, 0.38, 0.42, 0.41, 0.4, 0.4 ), x = c(16, 24, 32, 30, 30, 16, 12, 8, 36, 32, 36, 20, 26, 34, 28)), row.names = c(NA, -15L), class =
2012 Aug 18
1
texi2dvi error "Sweave" and "exams"
I have installed Sweave as recommended. http://lifeasclay.wordpress.com/tag/sweave/. Placing a test.Rnw file, for instance, in "/Library/Frameworks/R.framework/Versions/2.15/Resources/library/utils/Sweave" generates test.tex files that generate pdf files with LaTeX. To be honest, placing Rnw files seem to make sense. The "exams" package does require not this step. It uses
2023 Aug 20
1
Determining Starting Values for Model Parameters in Nonlinear Regression
The cautions people have given about starting values are worth heeding. That nlxb() does well in many cases is useful, but not foolproof. And John Fox has shown that the problem can be tackled very simply too. Best, JN On 2023-08-19 18:42, Paul Bernal wrote: > Thank you so much Dr. Nash, I truly appreciate your kind and valuable contribution. > > Cheers, > Paul > > El El