Displaying 20 results from an estimated 2000 matches similar to: "R-beta: port of bicreg package to R?"
2006 Apr 23
1
Question about bicreg
Dear Adrian and Ian (and r-helpers),
I encountered a curious result in developing an example using the bicreg
function in the BMA package: I noticed that pairs of models with equal R^2
and equal numbers of predictors had nevertheless different BIC values.
Looking at the bicreg function, the definition of BIC appears to be the
usual one, or close to it [bic <- n * log(1 - r2/100) + (size - 1) *
2000 Sep 18
1
phantom(0) doesn't do what I expect it to [plotmath]
Hi,
I'm trying to make a legend with a justified list of numbers, so I
thought I would use phantom(0) to align the 3-digit numbers properly
with the 4-digit ones:
legend(x, y, xjust=1, yjust=1, lty=c(1,2,3,4,5), adj=c(0,0.5),
legend=expression(phantom(0)*300*plain(K),
phantom(0)*550*plain(K),
phantom(0)*830*plain(K),
2000 Sep 18
1
Latin1 encoded AFM files
Hi,
I patched my R-1.1.1 sources to add support for a couple more fonts to
the postscript device.
It works for alphanumeric characters, but I notice that I should be
supplying an AFM file with ISOLatin1Encoding (I'm using a standard AFM
for now, and get some parsing errors from R when I open the postscript
device).
Is there a program/script which will re-encode my AFM files from
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
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 <-
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:
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)
{
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
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
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
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
2006 Jul 12
1
Prediction interval of Y using BMA
Hello everybody,
In order to predict income for different time points, I fitted a linear
model with polynomial effects using BMA (bicreg(...)). It works fine, the
results are consistent with what we are looking for.
Now, we would like to predict income for a future time point t_next and of
course draw the prediction interval around the estimated value for this
point t_next. I've found the