Displaying 20 results from an estimated 25 matches for "distns".
Did you mean:
distn
2008 Apr 13
0
R project
...sition in an array so the output is the power of each combination of test, distribution, sample size and mu1, however my code is not working and i keep getting an error message returned. My code is:
proj1.sim<-function(){
tests<-c("t","Wilcoxon","bootstrap")
distns<-c("Normal","Uniform","Beta")
sample.sizes<-c("5","10","25","50","100")
mu1s<-c("0","0.5","1","1.5","2")
res<-array(0,c(length(tests),length(distns),le...
2017 Jan 03
1
.Internal for functions in distn.R
Hi,
the functions in distn.R were converted from .Internal to .External ([1], in 2012), and to .Call ([2], in 2014).
They are still listed as .Internal in names.c, although they are not used in that way.
Shouldn?t they be removed?
There?s quite some simplification to be had, e.g., do_math3 could go away and do_math2 would be simpler.
If that makes sense (I may be missing something?), I?d be
2023 Aug 27
1
Issue with gc() on Ubuntu 20.04
On Sun, 27 Aug 2023 19:54:23 +0100
John Logsdon <j.logsdon at quantex-research.com> wrote:
> Not so although it did lower the gc() time to 95.84%.
>
> This was on a 16 core Threadripper 1950X box so I was intending to
> use library parallel but I tried it on my lowly windows box that is
> years old and got it down to 88.07%.
Does the Windows box have the same version of R
2010 Nov 09
2
simulation from pareto distn
Dear all,
I am trying to simulate from truncated Pareto distribution. I know there is
a package called PtProcess for Pareto distribution...but it is not for
truncated one. Can anyone please help me with this?
Thanks in advance.
Cassie
[[alternative HTML version deleted]]
2008 Oct 22
0
ad.test exponential distribution
Hi,
I'm trying to use ad.test or ad2.test to test whether a given data set is
exponential. I see that one of the function inputs is "distn", but I try
"exponential" and 5 other variants, but I still get the error message:
ad.test(test2, distn="exponential", fit=list(estimate = 0.167685), H=NA,
sim=100)
Error in ad.test(test2, distn = "exponential",
2023 Aug 27
1
Issue with gc() on Ubuntu 20.04
Folks
I have come across an issue with gc() hogging the processor according to
Rprof.
Platform is Ubuntu 20.04 all up to date
R version 4.3.1
libraries: survival, MASS, gtools and openxlsx.
With default gc.auto options, the profiler notes the garbage collector
as self.pct 99.39%.
So I have tried switching it off using options(gc.auto=Inf) in the R
session before running my program using
2009 Jul 09
2
Improvement of [dpq]wilcox functions
Hi,
I believe I have significantly improved [dpq]wilcox
functions by implementing Harding's algorithm:
Harding, E.F. (1984): An Efficient, Minimal-storage Procedure
for Calculating the Mann-Whitney U, Generalized U and Similar
Distributions, App. Statist., 33, 1-6
Results on my computer show (against R-2.9.1):
> system.time( dwilcox( 800, 800, 80) )
user system elapsed
0.240
2006 Apr 13
2
contribution offer: df() for non-centrality != 0
Hi R-devels,
I noticed that for the scheduled R 2.3.0,
there is still no function df() for
non-centrality != 0.
Easter is quickly approaching, so as my little
gift, I would like to offer you some code to fill
this gap:
After excluding some "unusual" cases,
it amounts to differentiating the corresponding
function pnf() --- which in turn leads to the
function dnbeta() already available
2011 Aug 26
2
How to generate a random variate that is correlated with a given right-censored random variate?
Hi,
I have a right-censored (positive) random variable (e.g. failure times subject to right censoring) that is observed for N subjects: Y_i, I = 1, 2, ..., N. Note that Y_i = min(T_i, C_i), where T_i is the true failure time and C_i is the censored time. Let us assume that C_i is independent of T_i. Now, I would like to generate another random variable U_i, I = 1, 2, ..., N, which is
2006 Feb 06
3
power and sample size for a GLM with poisson response variable
Hi all,
I would like to estimate power and necessary sample size for a GLM with
a response variable that has a poisson distribution. Do you have any
suggestions for how I can do this in R? Thank you for your help.
Sincerely,
Craig
--
Craig A. Faulhaber
Department of Forest, Range, and Wildlife Sciences
Utah State University
5230 Old Main Hill
Logan, UT 84322
(435)797-3892
2008 May 23
1
maximizing the gamma likelihood
for learning purposes and also to help someone, i used roger peng's
document to get the mle's of the gamma where the gamma is defined as
f(y_i) = (1/gammafunction(shape)) * (scale^shape) * (y_i^(shape-1)) *
exp(-scale*y_i)
( i'm defining the scale as lambda rather than 1/lambda. various books
define it differently ).
i found the likelihood to be n*shape*log(scale) +
2003 Jul 16
2
Density function for non-central t distribution
Hi,
I've written some C code for density evaluation of the non-central t distribution. It works
with the R-1.7.1 source code if placed in the src/nmath directory and after appropriate
changes are made to Makefiles, to the dt function in src/library/base/R/distn.R etc.
I haven't read a lot of R source code so it may need some R-ification, but I've tried to use the
dt.c file as a
2010 Jun 23
1
A question about R2Winbugs
Dear R users:
I was trying to fit a HMM with mixture of Gaussian into the dataset, and I
tried to implement it by R2Winbugs. But I got the following errer.
*
Error in FUN(X[[1L]], ...) :
.C(..): 'type' must be "real" for this format*
Does anybody know what's the problem? Does R2Winbugs accept some matrix as
inits? I would really appreciate your help. Thank you very much.
2015 Oct 24
0
Building R for AIX in 32-bit mode - as preparation for building in 64-bit mode (changed subject!) - INFO/FEEDBACK - do not read as a bug report!
I have determined why there are many "WARNING: Duplicate symbol:" messages.
*** My apologies for the length *** There is a lot of detail - but I
hope the detail will help R - and others - setup correct options for
shared libraries.
*** As I press send, I have not stopped testing (my final trial here
might not even work) - but!
*** the message is that shared libraries do not need to have
2015 Oct 18
2
Building R for AIX in 32-bit mode - as preparation for building in 64-bit mode (changed subject!) - INFO/FEEDBACK - do not read as a bug report!
On 2015-10-15 15:02, Prof Brian Ripley wrote:
> On 15/10/2015 13:32, Michael Felt wrote:
>> Hi.
>>
>> Just wanted to let you know I am getting close to packaging R for AIX in
rephrase - would like to be active in keeping R binaries current for
AIX. My interest in not in R per se (rather a colleague who has a
project that uses R, so I hope to assist him, and others like him).
2006 Mar 08
1
power and sample size for a GLM with Poisson response variable
Craig, Thanks for your follow-up note on using the asypow package. My
problem was not only constructing the "constraints" vector but, for my
particular situation (Poisson regression, two groups, sample sizes of
(1081,3180), I get very different results using asypow package compared
to my other (home grown) approaches.
library(asypow)
pois.mean<-c(0.0065,0.0003)
info.pois <-
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the
order of the arguments. This is an example:
> rpois(n=1,lambda=2)
[1] 3
> rpois(lambda=2,n=1)
[1] 2 0
It obviously uses the first argument as the number of samples to be
drawn, which is wrong.
I used Version 0.49 Beta (April 23, 1997).
Fredrik
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the
order of the arguments. This is an example:
> rpois(n=1,lambda=2)
[1] 3
> rpois(lambda=2,n=1)
[1] 2 0
It obviously uses the first argument as the number of samples to be
drawn, which is wrong.
I used Version 0.49 Beta (April 23, 1997).
Fredrik
2010 Aug 09
1
R Base Code
Hello all,
I need to imitate the 'q' function (qnorm, qweibull, etc) for Clark's 2Dt
distribution model. I'm not skilled enough in R to code it myself, so I
thought I could find the base code for one of the existing 'q' functions and
just modify it. However, I'm having trouble navigating through the R Source
Code on the CRAN website. I've searched some forum and
2010 Oct 18
1
Data contamination
Dear experts,
Helps are badly needed.
I'm trying to generate a panel data with error term from N(0,1) and alpha
from U(0,20).Explanatory variables are from multivariate std normal distn.
Problem arised when I tried to contaminate the data in Y by adding
additional term from N(50,1). I ask the computer to choose 5 random data
from Y by using the command runif(5,1,50) since we have 50 data