Displaying 20 results from an estimated 40000 matches similar to: "how to find critical values of t in R"
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)))
2008 Apr 04
2
format numbers using 1000 separator
Hi,
Does anyone know how one could format numbers using 1000 separator in R? For
example, format 1000 as 1,000 and 100000 as 100,000, etc.
Thanks,
--
Tom
[[alternative HTML version deleted]]
2007 Oct 30
3
Homework help: Is this how CI using t dist are constructed?
I'm trying to replicate some of the examples from my textbook in R (my
text uses Minitab). In this problem, I'm trying to construct a 95%
confidence interval for these distance measurements [1]:
> # Case Study 7.4.1, p. 483
> x <- scan()
1: 62 52 68 23 34 45 27 42 83 56 40
12:
Read 11 items
> alpha<-.95
> mean(x) + qt(c((1-alpha)/2, 1-((1-alpha)/2)), df=length(x)-1) *
2009 Nov 27
2
using reshape to do ANOVA mixed models
Hi,
I just started with R and I found that there are many options to rearrange
the data to do mixed models.
I want to use the reshape function. I have 2 between subject variables and
one within.
I was able to change the data structure but still - the result of the aov
functions are calculating everything as a within subject.
the table looks like this:
SerialNo breed treatment distance_1
2007 Sep 13
3
t.test() with missing values
Hello!
I am using R 2.5.1 on a Apple Power Book G4 with Mac OS X 10.4.10 and
I am still R beginner.
I try to calculate a t.test() using this code:
TTest75<-t.test(Fem75, Mal75, alternative= "two.sided", paired= TRUE)
This works properly, but I have two variables with a lot of missing
data and therefore get the error message:
TTest66<-t.test(Fem66, Mal66, alternative=
2005 Dec 08
2
qt for df < 1
I was experimenting yesterday with a binomial make.link option
for estimating student t binary response models, tentatively
called gossit, and I noticed eventually that the R qt function doesn't
like df < 1. Vaguely recalling that Splus didn't seem to mind such
weirdness, I checked on our soon to be defunct Splus6.2 and
sure enough, it produced plausible answers instead of R's
2005 Aug 08
2
extract t-values from pairwise.t.test
Hi,
how can I extract the t-values after running a pairwise.t.test? The
output just list the p-values.
Many thanks for your help.
Cheers
Guido
____________________________________
Guido J. Parra
School of Tropical Environment Studies and Geography
James Cook University
Townsville
Queensland 4811
Phone: 61 7 47815824
Fax: 61 7 47814020
Mobile: 0437630843
e-mail:
2008 May 09
1
RMSE and lm
Hi,
Does anyone know if the RMSE is one of the values provided by the lm model,
or do we have to calculate it by hand from the residuals?
Thanks,
--
Tom
[[alternative HTML version deleted]]
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
2013 Feb 08
3
On p-values presented in the summary of Linear Models
Dear list members
I have a doubt on how p-values for t-statistics are calculated in the
summary of Linear Models.
Here goes an example:
x <- rnorm(100,50,10)
y <- rnorm(100,0,5)
fit1<-lm(y~x)
summary(fit1)
summary(fit1)$coef[2] # b
summary(fit1)$coef[4] # Std. Error
summary(fit1)$coef[6] # t-statistic
summary(fit1)$coef[8] # Pr(>|t|
summary(fit1)$df [2] # degrees of freedom
#
2011 May 24
1
power.t.test visualization problem
Dear R-User,
I'm trying to visualize the results of the power calculation with the
function power.t.test(). Therefore I want to plot the related
t-distributions and shade the surfaces indicatingt the type I error,
the type II error and the power. For sample sizes greater 30 I got
results which are very satisfying. For small sample sizes I got stuck
and did'nt find a mistake.
To
2006 Aug 04
2
Doubt about Student t distribution simulation
Dear R list,
I would like to illustrate the origin of the Student t distribution using R.
So, if (sample.mean - pop.mean) / standard.error(sample.mean) has t
distribution with (sample.size - 1) degree free, what is wrong with the
simulation below? I think that the theoretical curve should agree with
the relative frequencies of the t values calculated:
#== begin options=====
# parameters
2006 Mar 27
1
Differential Equations
Dear R-community
My ODE problems looks as follows:
(1) dA/dt = u*A - v*B
(2) dB/dt = v*B - u*A
where u is a constant, and v=k*t (k=constant, t=time)
Does anybody knows a good function/procedure of solving? Should one
involve the equation (3) dv/dt = k?
Thanks for your support.
--
Dominik Heinzmann
Master of Science in Mathematics, EPFL
Ph.D. student in Biostatistics
Institute of Mathematics
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
2007 Nov 28
6
How to create data frame from data with unequal length
Hi,
I have two sets of data that I would like to put into a data frame. But
since they have different length, I am not sure how to do this. Here is an
example of my data:
data set one:
date growth
1/1/2007 10
1/2/2007 10.2
1/3/2007 10.4
1/4/2007 10.6
data set two:
date growth
1/1/2007 22
1/2/2007 22.5
1/4/2007 22.4
I would like to combine the two data sets and
2006 Apr 20
2
bug: code not working as expected (PR#8783)
Hi,
I've attached two files with the sources for a function to implement the
finite difference method for solving a particular differential equation.
One of them works correctly, the other gives wrong results or returns an
error, depending on the version of R.
The difference between them is that in the 'broken' version in line 42 I
check if the items in the two-dimensional array
2009 Nov 07
2
a bug with Student t-value??
Hello, every one,
Using the qt() function in R, I got a different Student t-value with the
Student t table.
e.g. the return value of function qt(0.95,9) is 1.833, while in table it is
2.262.
I do not know why the difference exists. I guess it may be a bug in R.
--
Íõ»¯Èå ²©Ê¿Ñо¿Éú
±±¾©Ê¦·¶´óѧ¾°¹ÛÉú̬Óë¿É³ÖÐøÐÔ¿ÆѧÑо¿ÖÐÐÄ
±±¾©Êк£µíÇøнֿÚÍâ´ó½Ö19ºÅ±±¾©Ê¦·¶´óѧÉúÃü¿ÆѧѧԺ 100875
Huaru
2008 Jan 09
3
likelihood from test result
Is there any automatic mechanism for extracting a likelihood or test
statistic distribution (PDF or CDF) from an object of class "htest" or
from another object of a general class encoding a hypothesis test
result?
I would like to have a function that takes "x", an object of class
"htest", as its only argument and that returns the likelihood or test
statistic
2006 May 29
6
Numerical error in R (win32) (PR#8909)
Hi
I had observed the following problem in R (also C, Matlab, and Python).
sprintf('%1.2g\n', 3.15)
give 3.1 instead of 3.2 whereas an input of 3.75 gives 3.8.
Java's System.out.printf is ok though.
> round(3.75,1)
[1] 3.8
> round(3.15,1)
[1] 3.1
Similar outcome with sprintf in R.
However, the right answer should be 3.2
Regards
Teckpor
[[alternative HTML version
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