Displaying 20 results from an estimated 700 matches similar to: "Accuracy (PR#13999)"
2004 Mar 10
1
accuracy of chi-square distribution approximations
Hi there,
How accurate is the aproximation R makes to the Chi-Square distribution?
For example, if I run:
> qchisq(1/1000000,6)
[1] 0.03650857
how accurate is 0.0365 compared to the theoretical percentile? What kind
of approximations have been made in the software's algorithm? It woudl be
useful to know since I am working with tiny percentiles such as one
one-millionth and one
2004 Sep 06
1
qchisq (PR#7212)
Full_Name: David Clayton
Version: 1.8.1
OS: Linux
Submission from: (NULL) (131.111.126.242)
qchisq behaves very strangely when ncp is passed as zero (forcing internal
qnchisq to be called) when first argument is small.
Eg
> qchisq(1-1e-6, 1, ncp=0, lower.tail=TRUE)
qchisq(1-1e-6, 1, ncp=0, lower.tail=TRUE)
[1] 1024
while, if ncp is unspecified,
> qchisq(1-1e-6, 1)
qchisq(1-1e-6, 1)
2010 Nov 12
1
what's wrong with this 'length' in function?
Hi all,
I am having a trouble with this function I wrote
###################################################
p26=function(x,alpha){
# dummy variable
j=1
ci=matrix(ncol=2,nrow=3)
while (j<4){
if (j==2) {x=x+c(-1,1)*0.5}
ci[j,]=
x+qnorm(1-alpha/2)^2/2+
c(-1,1)*qnorm(1-alpha/2)*
sqrt(x+qnorm(1-alpha/2)^2/4)
j=j+1
if (j==3) { # exact
x=x-c(-1,1)*0.5
2004 Jan 19
2
small bug on qchisq (PR#6442)
Full_Name: Drouilhet R?my
Version: 1.8.1
OS: Linux
Submission from: (NULL) (195.221.43.136)
qchisq(1,10) works well but qchisq(1,10,ncp=0) does not work whereas ncp=0 is
the default value of the function qchisq(1,10). (of course, 10 will be replaced
by any integer value).
Let us notice that this bug occurs only when applying probability one.
(qchisq(seq(0,.9,.1),10,ncp=0) works very well).
2005 Aug 26
3
Matrix oriented computing
Hi,
I want to compute the quantiles of Chi^2 distributions with different
degrees of freedom like
x<-cbind(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9, 0.95, 0.975, 0.99, 0.995)
df<-rbind(1:100)
m<-qchisq(x,df)
and hoped to get back a length(df) times length(x) matrix with the
quantiles. Since this does not work, I use
x<-c(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9, 0.95, 0.975,
2008 Jan 07
2
chi-squared with zero df (PR#10551)
Full_Name: Jerry W. Lewis
Version: 2.6.1
OS: Windows XP Professional
Submission from: (NULL) (24.147.191.250)
pchisq(0,0,ncp=lambda) returns 0 instead of exp(-lambda/2)
pchisq(x,0,ncp=lambda) returns NaN instead of exp(-lambda/2)*(1 +
SUM_{r=0}^infty ((lambda/2)^r / r!) pchisq(x, df + 2r))
qchisq(.7,0,ncp=1) returns 1.712252 instead of 0.701297103
qchisq(exp(-1/2),0,ncp=1) returns 1.238938
2005 Jan 21
2
chi-Squared distribution in Friedman test
Dear R helpers:
Thanks for the previous reply. I am using Friedman racing test. According the the book "Pratical Nonprametric Statistic" by WJ Conover, after computing the statistics, he suggested to use chi-squared or F distribution to accept or reject null hypothesis. After looking into the source code, I found that R uses chi-sqaured distribution as below:
PVAL <-
2008 Feb 06
1
ci.pd() (Epi) and Newcombe method
Greetings!
I suspect that there is an error in the code for the
function ci.pd() in the Epi package.
This function is for computing confidence intervals
for a difference of proportions between two independent
groups of 0/1 responses, and implements the Newcombe
("Nc") method and the Agrasti-Caffo "AC" method.
I think there is an error in the computation for the
Newcombe
2007 Oct 10
5
chi2
Hello,
I want to use the quantile function so I read the doc but I don't understand with this
> qchisq(seq(0.05,0.95,by=0.05),df=(length(don)-1))
[1] 62667.11 62795.62 62882.42 62951.47 63010.74 63064.00 63113.39 63160.27 63205.65 63250.33 63295.04 63340.48 63387.48 63437.03 63490.53 63550.14 63619.68
[18] 63707.24 63837.16
Can you help me please?
2008 Nov 07
4
chi square table
Hi,
How do we get the value of a chi square as we usually look up on the
table on our text book?
i.e. Chi-square(0.01, df=8), the text book table gives 20.090
> dchisq(0.01, df=8)
[1] 1.036471e-08
> pchisq(0.01, df=8)
[1] 2.593772e-11
> qchisq(0.01, df=8)
[1] 1.646497
>
nono of them give me 20.090
Thanks,
cruz
2005 Jan 21
2
chi-Squared distribution
Dear Rs:
outer(1:3, 1:3, function(df1, df2) qf(0.95, df1, df2))
I compare this F distribution results with the table, the answers were perfect. But I need to see for chi-sqaured distribution. When I employed the similar formula
outer(1:3, 1:3, function(df1, df2) qchisq(0.95, df1, df2)) , I am getting unexpected results. I need to see the following values:
p=0.750 .....
1 1.323
2012 May 11
1
identify() doesn't return "true" numbers
Dear R community.
I am using the identify() function to identify outliers in my dataset.
This is the code I am using:
####################################################################
# Function to allow identifying points in the QQ plot (by mouseclicking)
qqInteractive <- function(..., IDENTIFY = TRUE)
{
qqplot(...) -> X
abline(a=0,b=1)
if(IDENTIFY) return(identify(X))
2007 May 31
1
Problems when linking to R shared library
Folks,
I'm fairly sure that I'm doing something stupid, but I'm getting a few
really strange results from *some* of the distributions, but by no means
all,
when I link directly to the R shared library.
I've tried this on both Windows with the precompiled Mingw binary of R-2.5.0
(compiling my code with MinGW-3.4.2), and by building R-2.5.0 on Mandriva
Linux with gcc-3.4.4 and
2003 May 15
2
kolmogorov-smirnov
Hello,
I got a rather simple question: Can I find somewhere in R the
significance values for a Kolmogorov distribution (I know the degrees
of freedom and I have already the maximum deviation). ks.test is not
really doing what I want. All I need is the values, like one can get
the values for a chi-squared distribution by 'qchisq(0.05, 375)'.
tnx,
Kurt.
2004 Aug 19
1
precision problems in testing with Intel compilers
I compiled the 1.9.1 src.rpm with the standard gnu tools and it works.
I tried compiling the 1.9.1 src.rpm with the Intel 8 C and FORTRAN
compilers and it bombs out during the testing phase:
comparing 'd-p-q-r-tests.Rout' to './d-p-q-r-tests.Rout.save' ...267c267
< df = 0.5[1] "Mean relative difference: 5.001647e-10"
---
> df = 0.5[1] TRUE
2010 Mar 27
5
producing a QQ plot.
Hello everyone I'm a beginner in Stats and R, I'm using R 2.10.1. I need to
create a multivariate qq plot, there is 8 variable group with each has 55
number of input. An example of what I did so far, just to get my point out:
> data=read.csv(file.choose(),header=T)
> data
country village group av_expen P2ary_ed no_fisher
1 Cook Islands Aitutaki D
2008 Aug 21
1
pnmath compilation failure; dylib issue?
(1) ...need to speed up a monte-carlo sampling...any suggestions about
how I can get R to use all 8 cores of a mac pro would be most useful
and very appreciated...
(2) spent the last few hours trying to get pnmath to compile under os-
x 10.5.4...
using gcc version 4.2.1 (Apple Inc. build 5553) as downloaded from
CRAN, xcode 3.0...
...xcode 3.1 installed over top of above after
2001 Dec 09
1
Help for Power analysis
Dear colleague,
I not sure this R code is correctly ? I would to show
the number of Sample Size at Sample Size Axis that line
draw from Power Axis (80%) from R code.
How I show this and select the most appropriate of
this power (.79955687 - 80983575).
Thank for your help and answer.
Best Regards,
Nikom Thanomsieng,
Email: nikom at kku.ac.th
....
#Power analysis: Sample size for
2013 Sep 15
1
DataEllipse versus Ellipse Function in R
Hi:
Does Ellipse and dataellipse function in R produce the same ellipse? I
wanted to see how the radius for the Ellipse function in R calculated. Also
what is the var-covariance matrix, if any, assumed for the dataellipse
function? Heres an example of the code where I am generating Multivariate
normal data and creating ellipse using the 2 functions:
library(car)
library(mvtnorm)
mu =
2003 Apr 13
2
Peculiarity in non-central qchisq for ncp > 294.92 ...
Hello all,
Here's my query:
Running R 1.6.2 on FreeBSD 5.0, and on WinXP, and I find that the
following hangs the process:
dchisq(alpha=0.01, df=1, ncp=295)
but it does work for ncp < 294.92.
Is this general?
Best wishes to all,
Andrew
Andrew Robinson Ph: 208 885 7115
Department of Forest Resources Fa: 208 885 6226
University of Idaho E : andrewr at uidaho.edu
PO