Displaying 20 results from an estimated 2000 matches similar to: "Code find exact distribution for runs test?"
2007 Oct 11
0
Cox with time varying effect
Dear R users,
I am doing Cox regression using coxph(Survival) or cph(Design).
I have time varying effects (diagnosed with schoenfeld residuals Chi2 test and graph) so I first want to split time into 2 separate intervals : t<6months and t>=6months, to estimate one hazard ratio (hr) for each interval.
I am analysing Overall survival according to 3 prognostic factors (age,deep,ldh).
2009 Mar 24
4
Error in FrF2 example on Mac OS
Dear all,
I just noticed that the 0.9 update for FrF2 did not work out for Mac OS due
to an error in an example that ran without error on all other platforms. I
do not find any reason for this. In the past, umlauts or tab characters have
sometimes been an issue, but I didn't find any of these. The function
definition is
FrF2(nruns = NULL, nfactors = NULL, factor.names = if
2011 Jun 10
2
Problem loading packages in R 2.13.0 on Mac
I am having problem loading packages in the newest version of R
(2.13.0) on my Mac. I have tried to install various packages (e.g.
lawstat, Rcmdr, car) and load them using the Package Installer and
Package Manager menu options but I get the follow error:
> library(lawstat)
Loading required package: mvtnorm
Error: package 'mvtnorm' could not be loaded
In addition: Warning
2012 Sep 12
1
Plotting US States: Issue with filled colors cycling
I'm having issues when trying to do a filled State plot using the maps()
package. It seems that the color values aren't being plotted correctly,
and I'm not sure why...
I've started debugging it, but I'm stuck. I've attached the code that I've
got so far. The for loop plots states 1:i. What I'm noticing is that the
colors are correct until after Michigan gets
2005 Jul 07
2
r: LOOPING
hi all
i know that one should try and limit the amount of looping in R
programs. i have supplied some code below. i am interested in seeing how
the code cold be rewritten if we dont use the loops.
a brief overview of what is done in the code.
==============================================
==============================================
==============================================
1. the input
2012 Feb 27
1
How to incorporate interaction terms in MRM function of ecodist library?
Hi,
I'm interested in incorporating some interaction terms between my
explanatory variables (distance matrices in this case) when I'm using the
function MRM of the package ecodist. The function is doing a multiple
regression on distance matrices. I can get the function to work perfectly on
my explanatory matrices by adding a (+) sign as known. However, when I try
to use the (*) sign or
2011 Dec 03
1
partial mantel tests in ecodist with intential NA values.
I would like to perform partial mantel tests on only within group values, with "between group" values assigned to NA.
This is possible in package ncf partial.mantel.test, however this sues a different permutation to that used in ecodist.ecodist will not accept data with NA values, returning a "matrix is not square error.
is it possible to perform this test in ecodist?
many thanks
2008 Jan 25
1
increasing speed for permutations of glm
Dear R Programmers,
I am trying to run a Poisson regression on all pairs of variables in a data
set and
obtain the permutation distribution. The number of pairs is around 100000.
It seems my code will take weeks to run, unless I try something else.
Could you give me any suggestions on how to improve the speed of the
code below, or any general suggestions on how I may accomplish this task.
Thanks
2009 May 20
1
Comparing spatial distributions - permutation test implementation
Hello everyone,
I am looking at the joint spatial distribution of 2 kinds of organisms
(estimated on a grid of points) and want to test for significant
association or dissociation.
My first question is: do you know a nice technique to do that,
considering that I have a limited number of points (36) but that they
are repeated (4 times)? I did GLMs to test for correlations between
the
2008 Jun 15
1
randomForest, 'No forest component...' error while calling Predict()
Dear R-users,
While making a prediction using the randomForest function (package
randomForest) I'm getting the following error message:
"Error in predict.randomForest(model, newdata = CV) : No forest component
in the object"
Here's my complete code. For reproducing this task, please find my 2 data
sets attached ( http://www.nabble.com/file/p17855119/data.rar data.rar ).
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
2007 Apr 27
2
Jarque-Bera and rnorm()
Folks,
I'm a bit puzzled by the fact that if I generate 100,000 standard normal
variates using rnorm() and perform the Jarque-Bera on the resulting vector,
I get p-values that vary drastically from run to run. Is this expected?
Surely the p-val should be close to 1 for each test?
Are 100,000 variates sufficient for this test?
Or is it that rnorm() is not a robust random number generator?
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, '' ),
2010 Sep 22
1
Multiple Lorenz curves in one diagram
Hi group,
I would like to draw multiple Lorenz curves in a single plot using
data already prepared. Here is a simple example:
require("lawstat")
lorenz.curve(c(1,2,3),c(4,5,4))
lorenz.curve(c(1,2,3),c(4,2,1))
This example draws two separate graphs. How can I combine them in a
distinguishable way? I tried ?polygon without success...
Ralf
2018 Jan 15
1
About levene.test
Hi,
What package(s) must I install so that I can apply the Levene' test in my
data?
I tried 'lawstat' but dependency ?VGAM? is not available for this package.
I am using Rstudio Version 1.1.383
Tks
[[alternative HTML version deleted]]
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