Displaying 20 results from an estimated 20000 matches similar to: "array vs matrix vs dataframe?"
2007 Sep 12
1
Integrate() error message, I am at a loss
Hello!
I have a problem with integrate() in my function nctspa(). Integrate
produces an error message "evaluation of function gave a result of
wrong length". I don't know what that means. Could anyone suggest me
what is wrong with my function?
These are the examples of function calls that work OK:
nctspa(a=1:10,n=5)
nctspa(a=1:10, n=5, mu=2, theta=3, renorm=0)
This does not work:
2010 Feb 09
1
how to adjust the output
Hi R-users,
I have this code below and I understand the error message but do not know how to correct it. My question is how do I get rid of “with absolute error < 7.5e-06” attach to value of cdf so that I can carry out the calculation.
integrand <- function(z)
{ alp <- 2.0165
rho <- 0.868
# simplified expressions
a <- alp-0.5
c1 <-
2010 Feb 10
1
looping problem
Hi R-users,
I have this code here:
library(numDeriv)
fprime <- function(z)
{ alp <- 2.0165;
rho <- 0.868;
# simplified expressions
a <- alp-0.5
c1 <- sqrt(pi)/(gamma(alp)*(1-rho)^alp)
c2 <- sqrt(rho)/(1-rho)
t1 <- exp(-z/(1-rho))
t2 <- (z/(2*c2))^a
bes1 <- besselI(z*c2,a)
t1bes1 <- t1*bes1
c1*t1bes1*t2
}
## Newton
2007 Apr 23
0
New version of actuar
UseRs,
actuar is a package for Actuarial Science. A rather preliminary
version (0.1-3) of the package has been available on CRAN since February 2006.
We now announce the immediate availability of version 0.9-2 sporting a large
number of new features.
Non actuaries behold! There can be some features of interest for you,
especially those related to new probability distribution and to the
2007 Apr 23
0
New version of actuar
UseRs,
actuar is a package for Actuarial Science. A rather preliminary
version (0.1-3) of the package has been available on CRAN since February 2006.
We now announce the immediate availability of version 0.9-2 sporting a large
number of new features.
Non actuaries behold! There can be some features of interest for you,
especially those related to new probability distribution and to the
2009 Mar 17
1
Need to build package for Affy HT HG-U133+ PM arrays
I would like to build a package for the HT HG-U133+ PM arrays from affy,
but I can't find any good documentation on how to go about it. Naively
using makecdfenv's make.cdf.package() causes R to seg-fault.
I'm unfamiliar with the CDF format as such, but I'm guessing that it's
changed somewhat because the PM arrays no longer have P/A and mismatches.
I'm looking to build
2007 Jul 10
3
ECDF, distribution of Pareto, distribution of Normal
Hello all,
I would like to plot the emperical CDF, normal CDF and pareto CDF in the
same graph and I amusing the following codes. "z" is a vector and I just
need the part when z between 1.6 and 3.
plot(ecdf(z), do.points=FALSE, verticals=TRUE,
xlim=c(1.6,3),ylim=c(1-sum(z>1.6)/length(z), 1))
x <- seq(1.6, 3, 0.1)
lines(x,pgpd(x, 1.544,0.4373,-0.2398), col="red")
y
2009 Dec 28
2
[BioC] make.cdf.package: Error: cannot allocate vector of size 1 Kb
My machine has 8GB memory. I had quit all other programs that might
take a lot of memory when I try the script (before I post the first
message in this thread). The cdf file is of only 741 MB. It is strange
to me to see the error.
On Mon, Dec 28, 2009 at 2:38 AM, Wolfgang Huber <whuber at embl.de> wrote:
> Dear Peng Yu
>
> how big is the RAM of your computer? You could try with
2006 Sep 23
1
Fitdistr() versus nls()
Hello R-Users,
I'm new to R so I apologize in advance for any big mistake I might
be doing. I'm trying to fit a set of samples with some probabilistic
curve, and I have an important question to ask; in particular I have
some data, from which I calculate manually the CDF, and then I import
them into R and try to fit: I have the x values (my original samples)
and the y values
2010 Sep 17
1
How to denote a line on the graph
Please give me some help, many thanks.
I graphed a expected CDF line of a binomial distribution on a graph,
And I have some observed points (observed CDF) from 4 groups fall on the
smooth CDF line.
I cannot really get the legend I want
legend ('topleft', c('a, 'b', 'c', 'd', 'expected CDF'), col=c(1,2,3,4),
pch=c(0,1,2, 3, '' ),
2017 Oct 07
1
beta binomial distribution
Hi,
I need to write two inequalities depend on cumulative distribution (CDF) of
beta binomial distribution where alpha and beta are unknown and need to
find them.
CDF of betabinomial(2,10,alpha,beta) <0.3<=CDF of
betabinomial(3,10,alpha,beta)
and
CDF of betabinomial(5,10,alpha,beta) <0.8<=CDF of
betabinomial(6,10,alpha,beta)
How I can do that using r studio package?
I tried to do
2010 Nov 09
1
agrep pmatch recursive???
Hello R Helpers,
Business - 64 bit windows 7, R 2.11.1
I am trying to match the character contents of one list, called 'exclude', to those of a second list, called 'dataset'
dataset is a list of file names with folder locations, and looks like this when called:
> dataset
[1] "A/10-10-29a-13.cdf" "A/10-10-29a-14.cdf" "A/10-10-29a-15.cdf"
2010 Feb 15
1
error message error
Hi r-users,
I hope somebody can help me to understand the error message. Here is my code;
## Newton iteration
newton_gam <- function(z)
{ n <- length(z)
r <- runif(n)
tol <- 1E-6
cdf <- vector(length=n, mode="numeric")
fprime <- vector(length=n, mode="numeric")
f <- vector(length=n, mode="numeric")
for (i in 1:1000)
{
2006 Mar 15
1
(newbie) Weighted qqplot?
Folks,
Normally, in a data frame, one observation counts as one observation
of the distribution. Thus one can easily produce a CDF and (in Splus
atleast) use cdf.compare to compare the CDF (BTW: what is the R
equivalent of the SPlus cdf.compare() function, if any?)
However, if each point should not count equally, how can I weight the
points before comparing the distributions? I was thinking of
1998 Sep 22
1
R-beta: port of bicreg package to R?
R version: 0.62.1 (June 15, 1998)
I just very naively attempted to grab the 'bicreg' package for
Bayesian model selection from the StatLib library, and get it running
under R.
I've hit a brick wall very quickly, and as an R novice I'm not sure
where to go next.
Here's what happened:
> bicreg(as.matrix(hiv[,c(-17,-18)]),as.matrix(hiv[,18]))
Error: invalid formula
>
2008 Mar 08
1
ask for help on nonlinear fitting
I have a table like the following. I want to fit Cm to Vm like this:
Cm ~ Cl+Q1*b1*38.67*exp(-b1*(Vm-Vp1)*0.03867)/(1+exp(-b1*(Vm-Vp1)*0.03867))^2+Q2*b2*38.67*exp(-b2*(Vm-Vp2)*0.03867)/(1+exp(-b2*(Vm-Vp2)*0.03867))^2
I use nls, with start=list(Q1=2e-3, b1=1, Vp1=-25, Q2=3e-3, b2=1,
Vp2=200). But I always get 'singlular gradient' error like this. But
in SigmaPlot I can get the result. How
2005 Jul 07
1
CDF plot
Dear all,
I have define a discrete distribution P(y_i=x_i)=p_i, which I want to
plot a CDF plot. However, I can not find a function in R to draw it
for me after searching R and R-archive. I only find the one for the
sample CDF instead my theoretical one.
I find stepfun can do it for me, however, I want to plot some
different CDF with same support x in one plot. I can not manage how to
do it with
2007 Feb 27
1
Additional args to fun in integrate() not found?
Hello, fellow Rdicts,
I have the code for the program below. I need to integrate a function
of "x" and "p". I use integrate to integrate over "x" and pass "p" as
an additional argument. "p" is specified and given default value in
the argument list. Still, integrate() cannot read "p", unless I
explicitly insert a numeric value in the
2012 Jun 14
2
plot cdf
Good Afternoon,
I'm trying to create a cdf plot, with the following code. It works well,
but I have little doubt, if you can help solve. When I create the plot,
like the graph line would still not appear with point
#cdf
x<-table(Dataset$Apcode)
View(s)
hist(s)
*plot(ecdf(x))*
x<-1 37607
2 26625
3 5856
4 25992
5 30585
6 16064
7 9850
..
...
..
186 52
--
View this message in
2001 May 08
1
ks.test in ctest package (PR#934)
1. There is, I believe, some redundant code in the calculation of the
test statistic in ks.test in the package ctest.
Lines 34-37 of the code read
x <- y(sort(x), ...) - (0:(n - 1))/n
STATISTIC <- switch(alternative, two.sided = max(abs(c(x,
x - 1/n))), greater = max(c(x, x - 1/n)), less = -min(c(x,
x - 1/n)))
Lines 35-37 could read