search for: ncp

Displaying 20 results from an estimated 196 matches for "ncp".

Did you mean: cp
2006 Dec 19
3
Bug in rt() ? (PR#9422)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 <<insert bug report here>> Reproduced on Debian and Windows ... On 2.4.x if you execute set.seed(12345) t.1 <- rt(n = 1000, df = 20) set.seed(12345) t.2 <- rt(n = 1000, df = 20, ncp = 0) all.equal(t.1, t.2) ## Not close to true This appears to be due to the fact that in 2.4.x rt is now rt function (n, df, ncp = 0) { if (missing(ncp)) .Internal(rt(n, df)) else rnorm(n, ncp)/sqrt(rchisq(n, df)/df) } <environment: namespace:stats> Whereas in 2.3....
2008 Jun 14
1
qt with ncp>37.62
help(qt) states that: "ncp non-centrality parameter delta; currently except for rt(), only for abs(ncp) <= 37.62" so I would expect that calling qt with non-centrality parameter exceeding 37.62 should fail, instead e.g. calling > mapply(function(x) qt(p = 0.9, df = 55, ncp = x),35:45) gives: [1] 40.21448 41....
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 Box 441133 W : http://www.uidaho.edu/~andrewr Moscow...
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] 0.9203443 > pchisq(0.0001 , 1, ncp=0, lower.tail = F, log.p = FALSE) [1] 0.9920213 > pchisq(0....
2003 Jul 16
2
Density function for non-central t distribution
...General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * * NOTE * * Requires the following auxiliary routines: * * lgammafn(x) - log gamma function * pnt(x, df, ncp) - the distribution function for the non-central t distribution * * * DESCRIPTION * * The non-central t density is * * f(x, df, ncp) = df^(df/2)*exp(-.5*ncp^2)/(sqrt(pi)*gamma(df/2)*(df+x^2)^((df+1)/2))*sum_{k=0}^Infinity gamma((df + k + df)/2)*ncp^k/prod(1:k)*(2*x^2/(df+x^2))^...
2000 Nov 28
1
non-centrality parameter in pf() (PR#752)
Bug Description: Problem with the function pf() when the non-centrality parameter is large. Here is a sample command. You should see a smooth line from 0 to about 55, and then the values of pf() go crazy from 55 to 100. ############################ ncp <- seq(0,100,length=200) plot(ncp,pf(5,7,2,ncp=ncp)) ############################ Version: platform = i686-pc-linux-gnu arch = i686 os = linux-gnu system = i686, linux-gnu status = major = 1 minor = 1.1 year = 2000 month = August day = 15 language = R Search Path: .GlobalEnv, Auto...
2002 Oct 17
3
Non-central distributions
Hi Folks, I note that, while the "chisq" functions dchisq(x, df, ncp=0, log = FALSE) pchisq(q, df, ncp=0, lower.tail = TRUE, log.p = FALSE) qchisq(p, df, ncp=0, lower.tail = TRUE, log.p = FALSE) rchisq(n, df, ncp=0) all have a slot for the non-centrality parameter "ncp", of the functions for the t and F distributions: dt(x, df, log =...
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 instead of 0
2005 Apr 26
1
Finding 'ncp' for t
Hi Folks, I'm looking for a neat procedure for the following: Given t0 such that pt(t0,df,ncp=0) = alpha (given) find ncp0 such that for given beta pt(t0,df,ncp=ncp0) = (1 - beta) (In other words, what's the ncp such that you get power (1-beta) to detect it, using a 1-sided test with size alpha when ncp = 0?) In the past I've done the groping by hand, but this time it needs to...
2006 Dec 10
1
Noncentral t & F distributions
...ta} = f_{1-alpha,1,\vu,\lambda=\delta^2}. However, this is not what is happening with the following code. The central distributions agree as they should but the noncentral distributions do not. Am I missing something or is there a bug in the code? > alpha <- 0.05 > nu <- 10 > NCP <- c(0,1,2,3) > TV <- (qt(1-alpha/2,nu,NCP))^2 > FV <- qf(1-alpha,1,nu,NCP^2) > rbind(TV,FV) [,1] [,2] [,3] [,4] TV 4.964603 12.535179 24.58013 41.71937 FV 4.964603 9.285829 18.98771 32.97855 > TV <- (qt(1-alpha/2,nu,NCP))^2 > FV <- qf(1-alpha/2,1...
2009 Jan 17
4
Where to find the source codes for the internal function in stats package
Dear all, I want to see the source codes for "dchisq(x, df, ncp=0, log = FALSE)", but cannot find it. I input "dchisq" in the R interface, and then enter, the following message return: > dchisq /*****************************************************/ function (x, df, ncp = 0, log = FALSE) { if (missing(ncp)) .Internal(dchisq(x, df,...
2001 Dec 04
1
pt fails with ncp
?pt states that ncp=0 is default, so this is correct > pt(3,3) [1] 0.9711656 > pt(3,3, ncp=0) [1] 0.9711656 but this is not > pt(-Inf,3) [1] 0 > pt(-Inf,3,ncp=0) [1] 0.5 is it? Torsten --please do not edit the information below-- Version: platform = i686-pc-linux-gnu arch = i686 os = linux-gnu s...
2006 Jul 01
1
noncentral F-distributed random numbers (PR#9055)
...Long Qu Version: 2.3.1 OS: Windows XP Submission from: (NULL) (64.113.93.235) The QQ-plot of two versions of simulating noncentral F-distributed random numbers has quite different scales: > qqplot(rf(1000,2,15,3),qf(runif(1000),2,15,3)) The rf() function reads: > rf function (n, df1, df2, ncp = 0) { if (ncp == 0) .Internal(rf(n, df1, df2)) else rchisq(n, df1, ncp = ncp)/rchisq(n, df2) } <environment: namespace:stats> where I believe both the numerator and the denominator should be divided by their corresponding degrees of freedom. My suggested (slighly augmen...
2010 Sep 01
3
3Com 3102 Phones
Has any advancement been made to get 3102 operational in either a SIP or H323 asterisk environment. A post back in time mentioned a downloader service. >From the posts and articles I have read, the NCP is acting like a bootp and tftp server which uploads the configuration to the phone?? Am I close? if so, where does one get the SIP image for he 3102 and 2102 phones? I had 8 donated, but they are useless without a NBX or NCP ? Any specs on how to configure linux to act like one? Thanks in adva...
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) [1] 23.92813
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 >
2007 Mar 07
2
Power calculation for detecting linear trend
...e same number. Am I doing something wrong in the calculation of the power? Here's my code: T<-5 R<-5 sigmasq<-0.1 q<-10 Vl<-(T*R)-2 Dl<-(R*(T-1)*T*(T+1)/(12*sigmasq))*(log(1+(q/100)))^2 #Dl result is still similar power.1<-1-pf(qf(.95,(T*R-2),1,ncp=0),(T*R-2),1,ncp=Dl) Thank you for any suggestions/help. I'm using R2.4.1, on windowsXP. Erik Meesters [[alternative HTML version deleted]]
2007 Nov 08
1
64-bit R-build on Mac OS X 10.4 - make check failures
...ion" *** caught segfault *** address 0x7fffeff7ffe30, cause 'memory not mapped' Traceback: 1: foo() 2: foo() 3: foo() ... 2154: foo() 2155: foo() 2156: foo() aborting ... Second error was in d-p-q-r-tests.Rout from this test: ## dbeta(*, ncp): a <- rlnorm(100) stopifnot(All.eq(a, dbeta(0, 1, a, ncp=0)), dbeta(0, 0.9, 2.2, ncp = c(0, a)) == Inf ) ## the first gave 0, the 2nd NaN in R <= 2.3.0 and generated this output in d-p-q-r-tests.Rout.fail > > ## dbeta(*, ncp): > a <-...
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).
2012 Feb 11
2
How to see a R function's code
I was wondering how do I actually see what's inside a function, say, density of t distribution, dt()? I know for some, I can type the function name inside R and the code will be displayed. But for dt(), I get > dt function (x, df, ncp, log = FALSE) { if (missing(ncp)) .Internal(dt(x, df, log)) else .Internal(dnt(x, df, ncp, log)) } <environment: namespace:stats> I am curious because I am doing rejection sampling and want to find a "bigger" distribution. [[alternative HTML version deleted]]