similar to: pchisq error

Displaying 20 results from an estimated 1000 matches similar to: "pchisq error"

2007 Jan 31
2
Bug in 'pchisq' for x=0.0 (PR#9485)
The function 'pchisq' from the 'stats' library gives a wrong result if the argument equals exactly zero: # Upper tail of central 1-df chi^2 distribution > pchisq(1 , 1, ncp=0, lower.tail = F, log.p = FALSE) [1] 0.3173105 > pchisq(0.5 , 1, ncp=0, lower.tail = F, log.p = FALSE) [1] 0.4795001 > pchisq(0.01 , 1, ncp=0, lower.tail = F, log.p = FALSE) [1]
2004 Jul 16
2
inconsistency in pchisq (PR#7099)
Full_Name: Richard Mott Version: 1.9.0 OS: Windows XP Submission from: (NULL) (81.178.233.208) Shouldn't these give the same answer? > pchisq(67.60644,df=1,lower.tail=F,ncp=0) [1] 3.219647e-15 > pchisq(67.60644,df=1,lower.tail=F) [1] 1.996145e-16 >
2006 Mar 02
1
calling R's library using C
Hi, Thanks, everyone for all the help! So, here is my calling function in C (called test.c): #include<stdio.h> #include<stdlib.h> #include<Rmath.h> int main(void) { printf("%f \n",pchisq(2.,7., 1, 0)); printf("%f \n",pnchisq(2.,7.,0., 1, 0)); return EXIT_SUCCESS; } I compile using: gcc test.c -I/usr/lib/R/include
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
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
2009 Oct 11
2
Accuracy (PR#13999)
Full_Name: Viktor Witkovsky Version: 2.9.2 OS: Windows XP Submission from: (NULL) (78.98.89.227) Hello, I have found strange behavior of the function qchisq (the non-central qchisq is based on inversion of pchisq, which is further based on pgamma). The function gives wrong results without any warning. For example: qchisq(1e-12,1,8.94^2,lower.tail=FALSE) gives 255.1840972465858 (notice that
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
2003 Feb 14
1
FW: [Fwd: Re: [S] Exact p-values]
Dear all Just for fun, I have just downloaded the paper mentioned below and checked it with R-1.6.1. Everything is ok with exception of Table 2b, where I get always 1 instead of 0.5: > pbinom(1e15,2e15,0.5) [1] 1 Which value should be correct? Best regards Christian Stratowa ============================================== Christian Stratowa, PhD Boehringer Ingelheim Austria Dept NCE Lead
2006 Mar 03
1
Fwd: Re: calling R's library using C
Sorry, forgot to switch the header to the R group.... --- Globe Trotter <itsme_410 at yahoo.com> wrote: > Date: Thu, 2 Mar 2006 19:35:21 -0800 (PST) > From: Globe Trotter <itsme_410 at yahoo.com> > Subject: Re: [R] calling R's library using C > To: Dirk Eddelbuettel <edd at debian.org> > > Hi, Dirk: > > Thanks for all the help. I thought I would
2008 Aug 10
1
(Un-)intentional change in drop1() "Chisq" behaviour?
Dear List, recently tried to reproduce the results of some custom model selection function after updating R, which unfortunately failed. However, I ultimately found the issue to be that testing with pchisq() in drop1() seems to have changed. In the below example, earlier versions (e.g. R 2.4.1) produce a missing P-value for the variable x, while newer versions (e.g. R 2.7.1) produce 0 (2.2e-16).
2002 Oct 14
2
Vector of quantiles
I have a quick question which is very simple but I seem to have a mental block! I'm using the pchisq function to specify a Chi Squared distribution with 9 df which I'm then going to use in the Kolmogorov-Smirnov Test to test some simulated values. so simply: pchisq(q, df=9) I know that q is the vector of quantiles but could anybody tell me what exactly this vector needs to contain?
2005 Aug 04
2
p-values
HI R-users, I am trying to repeat an example from Rayner and Best "A contingency table approach to nonparametric testing (Chapter 7, Ice cream example). In their book they calculate Durbin's statistic, D1, a dispersion statistics, D2, and a residual. P-values for each statistic is calculated from a chi-square distribution and also Monte Carlo p-values. I have found similar p-values
2010 Jul 07
1
Different goodness of fit tests leads to contradictory conclusions
I am trying to test goodness of fit for my legalistic regression using several options as shown below.  Hosmer-Lemeshow test (whose function I borrowed from a previous post), Hosmer–le Cessie omnibus lack of fit test (also borrowed from a previous post), Pearson chi-square test, and deviance test.  All the tests, except the deviance tests, produced p-values well above 0.05.  Would anyone please
2012 Mar 04
1
p-value from GLM
Dear all, I am fitting a GLM similar to library(MASS) anorex.1 <- glm(Treat~Postwt+Prewt,family = binomial, data = anorexia) I have found two ways of computing the p-value of the fitted model: pval1 <- 1-pchisq(anorex.1$deviance,anorex.1$df.residual) pval2 <- 1-pchisq(anorex.1$null.deviance - anorex.1$deviance, anorex.1$df.null - anorex.1$df.residual) pval2 is
2010 Jul 09
1
Appropriate tests for logistic regression with a continuous predictor variable and Bernoulli response variable
I have a data with binary response variable, repcnd (pregnant or not) and one predictor continuous variable, svl (body size) as shown below. I did Hosmer-Lemeshow test as a goodness of fit (as suggested by a kind “R-helper” previously). To test whether the predictor (svl, or body size) has significant effect on predicting whether or not a female snake is pregnant, I used the differences between
2005 Apr 22
1
Infinite degrees of freedom for F-distribution
This is just a suggestion/wish that it would be nice for the F-distribution functions to recognize limiting cases for infinite degrees of freedom, as the t-distribution functions already do. The t-distribution functions recognize that df=Inf is equivalent to the standard normal distribution: > pt(1,df=Inf) [1] 0.8413447 > pnorm(1) [1] 0.8413447 On the other hand, pf() will accept Inf
2010 Mar 14
3
likelihood ratio test between glmer and glm
I am currently running a generalized linear mixed effect model using glmer and I want to estimate how much of the variance is explained by my random factor. summary(glmer(cbind(female,male)~date+(1|dam),family=binomial,data= liz3")) Generalized linear mixed model fit by the Laplace approximation Formula: cbind(female, male) ~ date + (1 | dam) Data: liz3 AIC BIC logLik deviance 241.3
2010 Mar 01
1
Fitting chi-squared distribution
Dear all, I have a question regarding performing test if the data fits chi-squared distribution. For example, using ks.test() I found in the examples how to fit it to gamma or weibull x<-rnorm(100) ks.test(x, "pweibull", shape=2,scale=1) for the gamma, pgamma can be used But I cannot find the value of this second parameter for the chi-squared distribution. Maybe someone
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
2020 Oct 09
1
Aide pour finaliser ce code
Hello. Here is my R code. I used the functional data . Now I need to use the functional data by applying the kernels instead of the xi, yi functions. Bonjour. Voici mon code en R . J'ai utiliser les donn?es fonctionnelles . Maintenant j'ai besoin d'utiliser les donn?es fonctionnelles en appliquant les noyaux ? la place des fontions xi, yi library(MASS)