similar to: power.t.test formula

Displaying 20 results from an estimated 30000 matches similar to: "power.t.test formula"

2008 Aug 20
2
arma: what is the meaning of Pr(>|t|)?
In the summary of the output of arma, there's a number Pr(>|t|), however, I don't know what is its meaning - at least, it doesn't _seem_ to be a Student's t distribution. Reproducible test case: x <- c(0.5, sin(1:9)) reg <- arma(x, c(1,0)) summary(reg) <output> Call: arma(x = x, order = c(1, 0)) Model: ARMA(1,0) Residuals: Min 1Q Median 3Q
2005 Nov 14
1
effect sizes for Wilcoxon tests
Hello, I use t.test for normal distributed and wilcox.test for non-normal distributed samples. It is easy to write a function for t.test that calculates the effect size, because all parts of the formula are available from the t.test result: r = sqrt(t*t / (t*t + df)) However, for Wilcoxon tests, the formula for effect sizes is: r = Z / sqrt(N) I wonder how I can calculate the Z-score in R for
2007 Jul 06
2
t.test
Hi, how can I solve a problem without the function t.test??? for example: x<-(1,3,5,7) y<-(2,4,6) t.test(x,y,alternative="less",paired=FALSE,var.equal=TRUE,conf.level=0.95) -- View this message in context: http://www.nabble.com/t.test-tf4034225.html#a11460445 Sent from the R help mailing list archive at Nabble.com.
2008 Feb 19
2
one-way anova power calculations
I have been attempting some basic power calculations using R and I am not getting the results I expect. I had a homework assignment in SAS, but I want to learn R as well, so I was attempting to reproduce my result. (No one else in the class is doing R, so there's no need to obsfucate the answer, the SAS code is what I get my grade for.) The code I am using is: # You assume that the
2009 Mar 17
2
formula question
Dear R People: Here is a small data frame and two particular formulas: > test.df y x 1 -0.9261650 1 2 1.5702700 2 3 0.1673920 3 4 0.7893085 4 5 0.3576875 5 6 -1.4620915 6 7 -0.5506215 7 8 -0.3480292 8 9 -1.2344036 9 10 0.8502660 10 > summary(lm(exp(y)~x)) Call: lm(formula = exp(y) ~ x) Residuals: Min 1Q Median 3Q Max -1.6360 -0.6435
2008 Dec 16
1
pwr.prop.test and continuity correction
Hi, I am trying to sort out a discrepancy between power calculations results between me and another statistician. I use R but I am not sure what she uses. It is on the proportions test and so I have been using pwr.prop.test. I think I have tracked the problem down to pwr.prop.test not using the continuity correction for the test (I did this by using the java applet from
2006 Nov 23
2
t.test()
Hi I have a vector x of length n. I am interested in x[1] being different from the other observations (ie x[-1]). My null hypothesis is that x[1] is drawn from a Gaussian distribution of the same mean as observations x[-1], which are assumed to be iid Gaussian. The (unknown) variance of x[1] is assumed to be the same as the variance of x[-1]. This should be an unpaired t-test. But
2006 Sep 13
2
an error message with 't.test' with R under Unix
Hi list,Could you please help me to explain the following error messages with 't.test' in R Unix 2.1.1? I don't see it in R under Windows (R 2.3.0) or Unix (R2.3.1). Is it really due to the different R versions?Thanks,...TaoUnix session: (R.2.1.1)========================> R.version _ platform x86_64-unknown-linux-gnuarch x86_64 os
2002 Mar 01
3
Power of t-test in R vs. S-PLUS
Dear all, I found a discrepancy while performing a power calculation for a two sample t-test in R and S-PLUS, respectively. For given values of sample number (5 each), sd (0.2) , significance level (0.01), and a desired power (80%) I looked for the difference in means. These values differ: 0.5488882 in R and 0.4322771 in S-PLUS (see dump below). Did I overlook any detail or confuse some
2006 Oct 27
3
Power of test
What would be the R formulae for a two-sided test? I have a formula for a one-sided test: powertest <- function(a,m0,m1,n,s){ t1 = -qnorm(1-a) num = abs(m0-m1) * sqrt(n) t2 = num/s pow = pnorm(t1 + t2) } Would you pls let me know if you know of? Thank you, ej
2007 Dec 17
2
regression towards the mean, AS paper November 2007
Dear friends, regression towards the mean is interesting in medical circles, and a very recent paper (The American Statistician November 2007;61:302-307 by Krause and Pinheiro) treats it at length. An initial example specifies (p 303): "Consider the following example: we draw 100 samples from a bivariate Normal distribution with X0~N(0,1), X1~N(0,1) and cov(X0,X1)=0.7, We then calculate
2006 Mar 24
4
How to capture t-score and p-values from t.test
When I do t.test on two distributions (see example below), it outputs numerous data about the t.test. What I'd like to do is individually capture some of this data and assign it to other variables. However, I am unable to find anything in the help section. In the example below, the t value is -4.0441 and the p-value is 0.006771 How can I assign these values to two variables, let's
2006 Jun 27
2
Mauchly and Levene
Hallo! I just started working with R to do the statistical analyses for my diploma thesis. I got two sets of data. Both contain repeated measures. One has only one within-subject factor with four levels. The other has one within-subject factor with two levels and one between-factor with two levels. I want to compute a Mauchly test for both sets and a Levene test for the second set. I
2007 Mar 07
2
Power calculation for detecting linear trend
Dear people, I've a problem in doing a power calculation. In Fryer and Nicholson (1993), ICES J. mar. Sci. 50: 161-168 page 164 an example is given with the following characteristics T=5, points in time R=5, replicates Var.within=0.1 q=10, a 10% increase per year The degrees of freedom for the test are calculated as Vl=T*R-2=23 and the non-centrality parameter Dl=4.54. Using this they get a
2007 Nov 07
1
Homework help: t test hypothesis testing with summarized data?
Is this how a t hypothesis test is done when I don't have the actual data, but just the summarized statistics: > #Homework 9.2.6 [1] > n<-31 > xbar<-3.10 > s_x<-1.469 > m<-57 > ybar<-2.43 > s_y<-1.35 > s_pooled<- (((n-1)*s_x^2) + ((m-1)*s_y^2)) / (n + m - 2) > s_pooled [1] 1.939521 > t_obs <- (xbar - ybar) / (s_pooled * (sqrt(1/n + 1/m)))
2011 Aug 01
3
formula used by R to compute the t-values in a linear regression
Hello, I was wondering if someone knows the formula used by the function lm to compute the t-values. I am trying to implement a linear regression myself. Assuming that I have K variables, and N observations, the formula I am using is: For the k-th variable, t-value= b_k/sigma_k With b_k is the coefficient for the k-th variable, and sigma_k =(t(x) x )^(-1) _kk is its standard deviation.
2009 Sep 28
1
Using linear formula inside MLE
Say I have a formula Y ~ 1 + X, where X is a categorical variable. A previous thread showed how to evaluate this model using the mle package from "stats4" (see below). But, the user had to create the data matrix, X, including the column of one's for the regression constant. Is there a way to nest the linear formula in the code below, so the data matrix doesn't explicitly
2006 Jan 25
2
Unequal sample sizes when calculating power
Power calculations two sample test for proportions is very useful. Is there a way however, to get away from the two samples being of the same size. What would happen if one had n=15 in the one sample and n=45 in the other sample. Farrel Buchinsky, MD Pediatric Otolaryngologist Allegheny General Hospital Pittsburgh, PA **********************************************************************
2006 Feb 21
3
How to get around heteroscedasticity with non-linear leas t squares in R?
Your understanding isn't similar to mine. Mine says robust/resistant methods are for data with heavy tails, not heteroscedasticity. The common ways to approach heteroscedasticity are transformation and weighting. The first is easy and usually quite effective for dose-response data. The second is not much harder. Both can be done in R with nls(). Andy From: Quin Wills > > I am
2010 Jan 05
4
solving cubic/quartic equations non-iteratively
To R-helpers, R offers the polyroot function for solving mentioned equations iteratively. However, Dr Math and Mathworld (and other places) show in detail how to solve mentioned equations non-iteratively. Do implementations for R that are non-iterative and that solve mentioned equations exists? Regards, Mads Jeppe