Displaying 20 results from an estimated 3000 matches similar to: "prop.test correct true and false gives same answer"
2007 Feb 01
2
prop.test() references
Dear R-help,
I'm using prop.test() to compute a confidence interval for a proportion
under R version 2.4.1, as in:
prop.test(x = 340, n = 400)$conf
[1] 0.8103309 0.8827749
I have two questions:
1) from the source code my understanding is that the confidence
interval is computed according to Wilson, E.B. (1927) Probable
inference, the law of succession, and statistical inference.
J. Am.
2011 Dec 08
1
prop.test() and the simultaneous confidence interval for multiple proportions in R
Dear list members,
I want to perform in R the analysis "simultaneous confidence interval for multiple proportions", as illustrated in the article of Agresti et al. (2008) "Simultaneous confidence intervals for comparing binomial parameter", Biometrics 64, 1270-1275.
If I am not wrong the R function implementing the Agresti et al. method is prop.test(). I ask an help because I
2003 Apr 18
2
prop.test confidence intervals (PR#2794)
Full_Name: Robert W. Baer, Ph.D.
Version: 1.6.2
OS: Windows 2000
Submission from: (NULL) (198.209.172.106)
Problem: prop.test() does not seem to produce appropriate confidence intervals
for the case where the vector length of x and n is one. (I am not certain about
higher vector lengths.)
As an example, I include x=6 and n=42 which has a mean proportion of 0.115.
When I calculate the 95% CI
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
2007 Feb 27
1
prop.test or chisq.test ..?
Hi everyone,
Suppose I have a count the occurrences of positive results, and the total
number of occurrences:
pos <- 14
total <- 15
testing that the proportion of positive occurrences is greater than 0.5 gives
a p-value and confidence interval:
prop.test( pos, total, p=0.5, alternative='greater')
1-sample proportions test with continuity correction
data: 14 out of
2006 Oct 31
1
Confidence interval calculation in prop.test (PR#9325)
Full_Name: Richard Johnston
Version: 2.4.0
OS: OS X
Submission from: (NULL) (69.169.0.241)
The confidence interval calculation for prop.test appears incorrect when
alternative="greater" . The upper limit is always set to 1.0000. The lower
limit appears to be correct.
> total=c(250,250)
> success=c(55,31)
>
2009 Aug 13
1
prop.test() - need algorithm or reference
Preparing a paper for a medical journal.
Using the prop.test() function in R (v2.4.0)
to compare two groups' response to data like the following.
A sample of 100 individuals from Population I, 18 with positive readings
from a certain test,
vs.
A sample of 148 individuals from Population II, 61 with positive readings.
Results look like this:
R version 2.4.0 Patched (2006-11-25
2011 Jul 17
3
?Accuracy of prop.test
I have just joined this list (and just started using R), so please
excuse any etiquette breaches as I do not yet have a feel for how the
list operates.
I am in the process of teaching myself statistics using R as my utility
as my ultimate goals cannot be satisfied by Excel or any of the plug-ins
I could afford.
I am currently looking at chap12 page 552 of Weiss's Introductory
Statistics
2006 Oct 31
1
Confidence interval calculation in prop.test
The confidence interval calculation in prop.test appears to be
incorrect when alternative="greater". The upper limit is always set
to 1.000. Am I missing something?
> total=c(250,250)
> success=c(55,31)
> prop.test(success,total,alternative="greater",correct=TRUE)
2-sample test for equality of proportions with continuity correction
data: success out of
2011 Apr 05
1
Confidence interval for the difference between proportions - method used in prop.test()
Hello,
Does anyone know which method from Newcombe (1998)* is implemented in prop.test for comparing two proportions?
I would guess it is the method based on the Wilson score (for single proportion), with and without continuity correction for prop.test(..., correct=FALSE) and prop.test(..., correct=TRUE). These methods would correspond to no. 10 and 11 tested in Newcombe, respectively. Can
2006 Dec 03
4
prop.trend.test issue
I have the clinical study data.
Year 0 Year 3
Retinol (nmol/L) N Mean +-sd Mean +-sd
Vitamin A group 73 1.89+-0.36 2.06+-0.53
Trace group 57 1.83+-0.31 1.78+-0.30
where N is the number of male for the clinical study.
I want to test if the mean serum retinol has increased over 3 years
among subjects in the vitamin A group.
> 1.89+0.36
2007 Feb 01
1
prop.test.Rd References patch
Hi all,
Presuming that my reply on r-help this morning was correct, attached is
a patch file against the current svn trunk version of prop.test.Rd to
add the references for the methods.
Any corrections are welcome.
Regards,
Marc Schwartz
2011 Apr 05
1
Antw: Re: Confidence interval for the difference between proportions - method used in prop.test()
Dear Josh,
Thanks for your help!
Does your answer mean, that you agree the two methods should do the same, and what I was guessing, despite the small differences?
What I prefer about ci.pd is, that the help clearly says which method is implemented, which is not the case for prop.test. But I do not know who has programmed the function.
Best wishes
Steffi
Stefanie von Felten, PhD
Statistician
2009 Dec 29
1
test of proportions
Hi r-users,
I would like to use prop.test code and I also calculate manually to test the proportions for 2 groups. The problem is the answer for the p-value calculated manually are different from prop.test. Here are the results:
## Manually
z value: z= (phat-p)/sqrt(pq/n) = (.084-.081)/sqrt(.081(1-.081)/691)=0.289, pvalue=0.7718
## Using prop.test code
> low <- c(56,58)
> tot
2008 Jul 02
1
is there an equivalent of prop.table but for counts
I have a simple table below called temptable and i want to obtain the
same structure that prop.table creates except get the counts
rather than the proportions. margin.table seems to create one table with
columns and rows whereas I am looking for the three table
type structure that prop.table gives. Thanks.
temptable<-structure(c(0L, 2L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L,
0L,
0L, 0L,
2012 Jul 06
3
Tables extraction in R ?
Hi,
I 'm a novice user of R statistics and my hands-on experience with it is
minimal.
I want to create a table for my MBA course assignment that looks like the
ones that SPSS and MS Excel produces ,the data that the table has to include
are the following :
> table(agec)
agec
1 2 3
749 160 32
> x=table(agec)
> x
agec
1 2 3
749 160 32
>
> prop.table(x)
agec
2001 Sep 24
2
confidence interval given by prop.test()
Dear R-help,
> prop.test(9, 137, p=0.066)
> prop.test(9, 137, p=0.05)
give two different 95% confidence intervals.
I thought the confidence interval calculation
should be independent of testing calculations (and thus
the null hypothesis)?
Splus 2000 has similar problems but give slightly different
answer.
Using R1.3.0 on windows.
Mai Zhou
2008 Dec 21
1
function prop.trend.test (stats)
To the R-help list,
In the documentation of the prop.trend.test function in the
stats package, no bibliography has been provided which
would allow one to find out the theoretical basis of that
function and/or details of its implementation.
May I suggest that some bibliography be included, as it
generally happens with other statistical functions.
I currently use R 2.8.0 running on Windows XP.
2011 Sep 27
1
compare proportions
Hi, I have a seemingly simple proportional test. ?here is the question I am trying to answer:
?
There is a test running each day in the lab, the test comes out as
either positive or negative. So at the end of each month, we can calculate a
positive rate in that month as the proportion of positive test results. The
data look like:
?
Month??? ??# positive?????? # total tests??? positive rate
2003 Nov 27
4
significance in difference of proportions
Hello,
I'm looking for some guidance with the following problem:
I've 2 samples A (111 items) and B (10 items) drawn from the same unknown
population. Witihn A I find 9 "positives" and in B 0 positives. I'd like to
know if the 2 samples A and B are different, ie is there a way to find out
whether the number of "positives" is significantly different in A and B?