Displaying 20 results from an estimated 10000 matches similar to: "Power of test"
2005 Jan 30
1
t-test or conf interval with known variance?
Hello,
Is there a built-in test in R for hypothesis testing with samples of
known variance?
For example, I've got a set of data, a mean to compare against, and a
known variance, and I want to determine the p-value for which I can
reject the null hypothesis (mu_1 = mu_0) and accept the alternative
(mu_1 > mu_0). I've found that JMP and Minitab can both do this (in
JMP, it's a
2001 Jul 02
2
Shapiro-Wilk test
Hi,
does the shapiro wilk test in R-1.3.0 work correctly? Maybe it does, but can
anybody tell me why the following sample doesn't give "W = 1" and
"p-value = 1":
R> x<-1:9/10;x
[1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
R> shapiro.test(qnorm(x))
Shapiro-Wilk normality test
data: qnorm(x)
W = 0.9925, p-value = 0.9986
I can't imagine a sample being
2012 Jun 18
3
(1-1e-100)==1 true?
Hi,
This problems has bothered me for the lase couple of hours.
> 1e-100==0
[1] FALSE
> (1-1e-100)==1
[1] TRUE
How can I tell R that 1-1e-100 does not equal to 1, actually, I found out
that
> (1-1e-16)==1
[1] FALSE
> (1-1e-17)==1
[1] TRUE
The reason I care about this is that I was try to use qnorm() in my code,
for example,
> qnorm(1e-100)
[1] -21.27345
and if I want to
2004 Aug 06
3
Bug in qnorm or pnorm?
I found the following strange behavior using qnorm() and pnorm():
> x<-8.21;x-qnorm(pnorm(x))
[1] 0.0004638484
> x<-8.22;x-qnorm(pnorm(x))
[1] 0.01046385
> x<-8.23;x-qnorm(pnorm(x))
[1] 0.02046385
> x<-8.24;x-qnorm(pnorm(x))
[1] 0.03046385
> x<-8.25;x-qnorm(pnorm(x))
[1] 0.04046385
> x<-8.26;x-qnorm(pnorm(x))
[1] 0.05046385
> x<-8.27;x-qnorm(pnorm(x))
2009 Mar 10
6
Pseudo-random numbers between two numbers
I would like to generate pseudo-random numbers between two numbers using
R, up to a given distribution,
for instance, rnorm.
That is something like rnorm(HowMany,Min,Max,mean,sd) over
rnorm(HowMany,mean,sd).
I am wondering if
dnorm(runif(HowMany, Min, Max), mean, sd)
is good. Any idea? Thanks.
-james
2005 Mar 09
3
problem using uniroot with integrate
Hi,
I'm trying to calculate the value of the variable, dp, below, in the
argument to the integral of dnorm(x-dp) * pnorm(x)^(m-1). This
corresponds to the estimate of the sensitivity of an observer in an
m-alternative forced choice experiment, given the probability of
a correct response, Pc, a Gaussian assumption for the noise and
no bias. The function that I wrote below gives me an error:
2011 Sep 03
3
question with uniroot function
Dear all,
I have the following problem with the uniroot function. I want to find
roots for the fucntion "Fp2" which is defined as below.
Fz <- function(z){0.8*pnorm(z)+p1*pnorm(z-u1)+(0.2-p1)*pnorm(z-u2)}
Fp <- function(t){(1-Fz(abs(qnorm(1-(t/2)))))+(Fz(-abs(qnorm(1-(t/2)))))}
Fp2 <- function(t) {Fp(t)-0.8*t/alpha}
th <- uniroot(Fp2, lower =0, upper =1,
2019 Jun 21
4
Calculation of e^{z^2/2} for a normal deviate z
You may want to look into using the log option to qnorm
e.g., in round figures:
> log(1e-300)
[1] -690.7755
> qnorm(-691, log=TRUE)
[1] -37.05315
> exp(37^2/2)
[1] 1.881797e+297
> exp(-37^2/2)
[1] 5.314068e-298
Notice that floating point representation cuts out at 1e+/-308 or so. If you want to go outside that range, you may need explicit manipulation of the log values. qnorm()
2010 Oct 03
2
sampling from normal distribution
Hello
If i want to resampl from the tails of normal distribution , are these commans equivelant??
upper tail:qnorm(runif(n,pnorm(b),1)) if b is an upper tail boundary
or
upper tail:qnorm((1-p)+p(runif(n)) if p is the probability of each interval (the observatins are divided to intervals)
Regards
[[alternative HTML version deleted]]
2007 Oct 14
1
Adjusting for heaping in data
Hi R users. I am new to the community and have got myself into a little problem.
I have a dataset of birth weights recorded by nurses at a delivery
clinic in an developing country.
The weights are entered in KiloGrams with one decimal. However there
is substantial heaping at each 500g when looking at the sample in a
histogram. Do anyone of you know a easy way to adjust for this and if
it exists
2008 Apr 13
4
R equivalent of erfcinv in matlab
I am converting some matlab code into R that use inverse of the
complementary error function, erfcinv and did not find an equivalent in
R, is there such a function in some contributed modules?
Thanks.
2003 Mar 31
2
point-biserial correlation
Dear list,
has anyone written a package/function in R for computing a point-
biserial resp. biserial correlation?
Thanks in advance
Bernd
2011 Sep 28
1
Wilcox test and data collection
Dear Contributors
I have a problem with the collection of data from the results of a test.
I need to perform a comparative test over groups of data , recall the value
of the pvalue and create a table.
My problem is in the way to replicate the analysis over and over again over
subsets of data according to a condition.
I have this database, called y:
gg t1 t2 d
40 1 1
2006 Jan 31
1
approximation to ln \Phi(x)
I am using pnorm() with the log.p=T argument to get approximations to ln \Phi(x) and qnorm with the log.p=T argument to get estimates of \Phi^{-1}(exp(x)). What approximations are used in these two functions (I noticed in the source pnorm.c it doesn't look like Abramowitz and Stegen) and where can I find the citation?
Thanks,
Richard Morey
2018 Apr 09
1
llvm-dev Digest, Vol 166, Issue 22
Hi Krzysztof,
Sure, please see below. DAG.dump.() before and after, annotated with what I
believe the DAG means.
I've spent some time debugging the method but it's proving difficult to
determine where the logic is misfiring. Disabling the entire combine causes
a lot of failing x86-64 tests - I may have to learn an upstream vector ISA
to make progress on this.
Thank you
>From your
2019 Jun 23
2
Calculation of e^{z^2/2} for a normal deviate z
I agree with many the sentiments about the wisdom of computing very
small p-values (although the example below may win some kind of a prize:
I've seen people talking about p-values of the order of 10^(-2000), but
never 10^(-(10^8)) !). That said, there are a several tricks for
getting more reasonable sums of very small probabilities. The first is
to scale the p-values by dividing the
2010 Nov 12
4
dnorm and qnorm
Hello all,
I have a question about basic statistics. Given a PDF value of 0.328161,
how can I find out the value of -0.625 in R? It is like reversing the dnorm
function but I do not know how to do it in R.
> pdf.xb <- dnorm(-0.625)
> pdf.xb
[1] 0.328161
> qnorm(pdf.xb)
[1] -0.444997
> pnorm(pdf.xb)
[1] 0.628605
Many thanks,
Edwin
--
View this message in context:
2012 Apr 24
2
Some Help Needed
Dear all,
I need to do some calculation where the code used are below. I get
error message when I choose k to be large, say greater than 25.
The error message is
"Error in integrate(temp, lower = 0, upper = 1, k, x, rho, m) :
the integral is probably divergent".
Can anyone give some help on resolving this. Thanks.
Hannah
m <- 100
alpha <- 0.05
rho <- 0.1
F0
2008 Oct 17
2
function help
Hi everyone,
I have dataset which I make a sample of it couple of times and each time I
get the mean and standard deviation of each row for each sample. I have a
function for that, which takes the name of the file and number of times to
sample and then returns the mean and standard deviation for each row in each
sample.
Sample=function(name, n){
2019 Jun 21
4
Calculation of e^{z^2/2} for a normal deviate z
Hello,
Well, try it:
p <- .Machine$double.eps^seq(0.5, 1, by = 0.05)
z <- qnorm(p/2)
pnorm(z)
# [1] 7.450581e-09 1.228888e-09 2.026908e-10 3.343152e-11 5.514145e-12
# [6] 9.094947e-13 1.500107e-13 2.474254e-14 4.080996e-15 6.731134e-16
#[11] 1.110223e-16
p/2
# [1] 7.450581e-09 1.228888e-09 2.026908e-10 3.343152e-11 5.514145e-12
# [6] 9.094947e-13 1.500107e-13 2.474254e-14 4.080996e-15