On Fri, 16 Mar 2007, Richard D. Morey wrote:
While using the rmvnorm function, I get the error:
Error in eigen(sigma, sym = TRUE) : error code 5 from Lapack routine
'dsyevr'
The same thing happens when I try the eigen() function on my covariance
matrix. The matrix is a symmetric 111x111
On Fri, 16 Mar 2007, Gad Abraham wrote:
Andrew Robinson wrote:
Hi Gad,
try:
class(a)
[1] Arima
getAnywhere(print.Arima)
Thanks Andrew.
For the record, the standard error is the square root of the diagonal of
the covariance matrix a$var.coef (itself obtained through some magic):
Hi,
I have a data frame x, and a vector y which limits x by rows
so that no element of x in that row is smaller than y.
For example,
x - as.data.frame( t( array( 1:9, dim=c(3,3
y - c( 2, 8, 0 )
x
V1 V2 V3
1 1 2 3
2 4 5 6
3 7 8 9
y
[1] 2 8 0
Thanks for your answer which was very helpfull. I have another question:
I have read in this document
(http://cran.r-project.org/doc/manuals/R-intro.pdf) that most of the
programs written in R are ephemeral and that new releases are not
always compatible with previous releases. What I would
Hi list,
I was wondering how I should go about fitting a sigmoid curve to a dataset.
More specifically how I estimate parameters a and b in the following equation:
1 / 1+exp(-(x-a)*b)
with b the steepness of the sigmoid curve and a the shift of the center of the
sigmoid curve relative to
The maps package has a function called match.map, which is for map coloring
.
Its example is followed:
# filled map showing Republican vote in 1900
# (figure 6 in the reference)
data(state, package = datasets)
data(votes.repub)
state.to.map - match.map(state, state.name)
x -
Gad == Gad Abraham [EMAIL PROTECTED]
on Fri, 16 Mar 2007 09:48:52 +1100 writes:
Gad Laura Hill wrote:
Hi
Could anybody give me a bit of advice on some code I'm having trouble
with?
I've been trying to calculate the loglikelihood of a function iterated
over
Gad == Gad Abraham [EMAIL PROTECTED]
on Fri, 16 Mar 2007 09:48:52 +1100 writes:
Gad Laura Hill wrote:
Hi
Could anybody give me a bit of advice on some code I'm having trouble
with?
I've been trying to calculate the loglikelihood of a function iterated
over
Received Thu 08 Mar 2007 2:38am +1100 from j.joshua thomas:
library(RGtk2)
library(rattle)
rattle()
click the ODBC option it as the DSN i am a bit confused with this i already
put my *.mdb file in C:drive
i try put the DSN name as Microsoft Access driver, in the appropriate text
box but
Dear R-Help friends,
I am unable to get the latest version of R (2.4.1) to compile on my solaris 10
system - has anybody else experienced this problem and are you able to offer me
any advice?
I appreciate your time, many thanks,
Jenny Barnes
Here are my CURRENT specifications:
platform
* Feng, Ken [CIB-EQTY] [EMAIL PROTECTED] [070316 09:40]:
Hi,
I have a data frame x, and a vector y which limits x by rows
so that no element of x in that row is smaller than y.
For example,
x - as.data.frame( t( array( 1:9, dim=c(3,3
y - c( 2, 8, 0 )
x
V1 V2 V3
1 1 2 3
* Bob Farmer [EMAIL PROTECTED] [070316 05:57]:
Hi all:
I would like to create a line of plot margin text (using mtext() ) that
features both a superscript and a subset of an object. However, I
cannot seem to do both things at once, nor have I found a way to paste
the two results
try:
mtext(substitute(R^2 * : * GoodnessOfFits[i],list(i=graphNumber)))
HTH.
On 3/16/07, Bob Farmer [EMAIL PROTECTED] wrote:
Hi all:
I would like to create a line of plot margin text (using mtext() ) that
features both a superscript and a subset of an object. However, I
cannot seem to do
you can use nls:
see
?nls
and its example.
HTH.
On 3/16/07, Hufkens Koen [EMAIL PROTECTED] wrote:
Hi list,
I was wondering how I should go about fitting a sigmoid curve to a dataset.
More specifically how I estimate parameters a and b in the following
equation:
1 / 1+exp(-(x-a)*b)
usstata wrote:
The maps package has a function called match.map, which is for map
coloring .
Its example is followed:
# filled map showing Republican vote in 1900
# (figure 6 in the reference)
data(state, package = datasets)
data(votes.repub)
state.to.map - match.map(state, state.name)
Dear R-help,
I found that the following code crashes R (version 2.4.0 in windows).
x=rnorm(10,0.1,1)
library(nlme)
gls(x~0)
I quickly found a work-around for what I was trying to do, but I thought I
should report this.
Best wishes
Simon Bond
Hi, R users,
The following script works well, but I have problem to add some legend on
graphs. For example, I would like to past on each topright graphs one
thing:
brown color for Gumbel density
green color for Weibull density
Thank you for your help
(See attached file:
* Steve Buyske [EMAIL PROTECTED] [070315 19:05]:
I am working on a project where we start with start with 2 long,
equal-length vectors, massage them in various ways, and end up with a
function mapping one interval to another. I'll call that function
f1. The last step in R is to generate
Dear Andrew and R-help,
Here is the error message that we got when trying to install R v2.4 (which we
tried to install before this newer version 2.4.1 - I'm afrid I didn't save the
error message from the latest attempt with the new version):
configure
make
...
...
...
f90: CODE: 0 WORDS,
Hi everyone,
I am interested in estimating this type of random effects panel:
y_it = x'_it * beta + u_it + e_it
u_it = rho * u_it-1 + d_itrho belongs to (-1, 1)
where:
u and e are independent and normally zero-mean distributed.
d is also independently normally zero-mean distributed.
I have a question, maybe it's better to explain by example:
alpha - 0.3
beta - 0.4
sigma - 0.5
err - rnorm(100)
err[15] - 5; err[25] - -4; err[50] - 10
x - 1:100
y - alpha + beta * x + sigma * err
ll - lm(y ~ x)
plot(ll)
Now, the graphs clearly show that 15, 25 and 50 are the indexes
of the bad
Dear R-users,
I am running a large number of simulations and estimating a
structural equation model for each one using the SEM package. Each
run of my program has around 8000 simulations. Most of the time the
program completes all of them correctly but sometimes I get a
segmentation
Hi all:
I'm using 'persp' for 3D graphics.
I need the axis's labels smaller than by defect.
I see in 'help()', the information about 'par()'.
I have wrote:
par(.,cex.axis=0.5,cex.lab=0.5)
perspc(.)
and the result don't change.
The question is: Can I change the size of
On 16-Mar-07 11:56:56, Alberto Monteiro wrote:
I have a question, maybe it's better to explain by example:
alpha - 0.3
beta - 0.4
sigma - 0.5
err - rnorm(100)
err[15] - 5; err[25] - -4; err[50] - 10
x - 1:100
y - alpha + beta * x + sigma * err
ll - lm(y ~ x)
plot(ll)
Now, the graphs
Ted Harding wrote:
alpha - 0.3
beta - 0.4
sigma - 0.5
err - rnorm(100)
err[15] - 5; err[25] - -4; err[50] - 10
x - 1:100
y - alpha + beta * x + sigma * err
ll - lm(y ~ x)
plot(ll)
ll is the output of a linear model fiited by lm(), and so has
several components (see ?lm in the
It seems you are using f90, but FLIBS was computed using g77. That would
mean that something has been altered since R was configured, or that the
way the Fortran compiler was specified was incorrect.
I think you need to start again and make use of only one set of compilers.
On Fri, 16 Mar
On 3/16/2007 8:02 AM, [EMAIL PROTECTED] wrote:
Hi all:
I'm using 'persp' for 3D graphics.
I need the axis's labels smaller than by defect.
I see in 'help()', the information about 'par()'.
I have wrote:
par(.,cex.axis=0.5,cex.lab=0.5)
perspc(.)
and the result
On Fri, 16 Mar 2007, Alberto Monteiro wrote:
Ted Harding wrote:
alpha - 0.3
beta - 0.4
sigma - 0.5
err - rnorm(100)
err[15] - 5; err[25] - -4; err[50] - 10
x - 1:100
y - alpha + beta * x + sigma * err
ll - lm(y ~ x)
plot(ll)
ll is the output of a linear model fiited by lm(), and so
Hi
you can check ?influence or ?influence.measures to evaluate some
regression diagnostics
Regards
Petr
On 16 Mar 2007 at 9:56, Alberto Monteiro wrote:
From: Alberto Monteiro [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Date sent: Fri, 16
Delphine Fontaine wrote:
Thanks for your answer which was very helpfull. I have another question:
I have read in this document
(http://cran.r-project.org/doc/manuals/R-intro.pdf) that most of the
programs written in R are ephemeral and that new releases are not
always compatible with
Hi all,
I am rather new to R. Recently I have been trying to implement some
tree algorithms in R. I used lists to model tree nodes. I thought
something like this would work:
parent - list();
child - list();
parent$child1 - child;
child$parent - parent;
When I tried to
On 16-Mar-07 12:41:50, Alberto Monteiro wrote:
Ted Harding wrote:
alpha - 0.3
beta - 0.4
sigma - 0.5
err - rnorm(100)
err[15] - 5; err[25] - -4; err[50] - 10
x - 1:100
y - alpha + beta * x + sigma * err
ll - lm(y ~ x)
plot(ll)
ll is the output of a linear model fiited by lm(), and
Rense Nieuwenhuis a écrit :
Dear Lukas,
allthough I'm intrigued by the purpose of what you are trying to do,
as mentioned by some of the other persons on this list, I liked the
challenge to write such a function.
I came up with the following during some train-traveling this morning:
Lists are not good for this. There is an example in section 3.3 of
the proto vignette of using proto objects for this. That section
also references an S4 example although its pretty messy with S4.
You might want to look at the graph, RBGL and graphviz packages
in Bioconductor and the
(I am posting the same question again, as some has replied my previous
question with his own question...)
Hi everyone,
I am interested in estimating this type of random effects panel:
y_it = x'_it * beta + u_it + e_it
u_it = rho * u_it-1 + d_itrho belongs to (-1, 1)
where:
u and e
Hello,
I iterate my question concerning hierarchical partitioning: Is it
possible to run that for a multinomial model?
I have adapted the function hier.part (hier.part package) to my
multinomial model. I met a problem with the partition() function: I
obtain NEGATIVE Independent contributions!
Let me rephrase that. Lists do not support references but they
could be used to represent trees.
list(a = list(a = 1, b = list(2, 3, d = list(4, 5)), c = list(4, 5))
is a tree whose top nodes are a, b, c and b contains three nodes
2, 3 and d and d contains 2 nodes.
However, if you want to do
Hi Gabor,
Thanks for the suggestions. I tried to look for the proto vignette
document but could not find it, could you tell me how to reach it?
Besides, is it possible to define my own node object type with a
default behavior for the - operator of its member variables being
Hi all,
[this is a bit hard to describe, so if my initial description is
confusing, please try running my code below]
#WHAT I'M TRYING TO DO
I'd appreciate any help in trying to speed up some code. I've written
a script that converts a matrix of integers (usually between 1-10,000
- these
(mount soapbox...)
While I know the prior discussion represents common practice, I would argue
-- perhaps even plead -- that the modern(?? 30 years old now) alternative
of robust/resistant estimation be used, especially in the readily available
situation of least-squares regression.
Hello,
I'm running an algorithm for graph structural cohesion that requires
a depth-first search of subgraphs of a rather large network. The
algorithm will necessarily be redundant in the subgraphs it recurses
to, so to speed up the process I implemented a check at each subgraph
to see if
for example:
I have got these data, organized in a dataframe.
sample1 sample2 sample3 sample4 group
replicate1 1.000.020.350.50A
replicate2 1.000.021.541.11A
replicate3 1.000.021.541.11A
replicate4 1.000.02
1. Here is your example redone using proto:
library(proto)
parent - proto()
child - proto(a = 1)
parent$child1 - child
child$parent.env - parent
# also just for illustration lets change a
parent$child1$a # 1
child$a - 2
parent$child1$a # 2
2. To redefine $- use S3 or S4 but it can be done
in
On 3/16/07, Gabor Grothendieck [EMAIL PROTECTED] wrote:
1. Here is your example redone using proto:
library(proto)
parent - proto()
child - proto(a = 1)
parent$child1 - child
child$parent.env - parent
This last line should have been:
parent.env(child) - parent
# also just for
Hello,
Given a vector I would like to rapidly identify duplicated non contiguous
elements.
Given for example
c(1,1,2, 3,2, 4, 5, 6,4)
I would like to get:
FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE TRUE
In fact I need to check this on the columns of a matrix!
I can do
Hello,
I would like to know wether R implements efficient approximations of the
functions log(1+exp(x)) and log(1-exp(x)). It seems the case for the latter one
but I'd like to make sure.
Thank you in advance.
Feriel Lahlali
Graduate student - France.
Well, I hadn't ever seen RBGL before, so that's great. I've been
using igraph and sna mainly, but there are a few points lacking
between these two. RBGL solves a lot of problems for me!
But I'm not sure it will solve this specific problem. Are you
suggesting I use RBGL to do a depth-first
Hello,
I would like to know wether R implements efficient approximations of the
functions log(1+exp(x)) and log(1-exp(x)). It seems the case for the latter one
but I'd like to make sure.
Thank you in advance.
Feriel Lahlali
Graduate student - France.
On Fri, 2007-03-16 at 00:50 +, Tyler Smith wrote:
Hi,
I've got a dataset with 7 variables for 8 different species. I'd like
to test the null hypothesis of no difference among species for these
variables. MANOVA seems like the appropriate test, but since I'm
unsure of how well the data
Maybe not the most efficient, but here's a vector-level solution:
non.contig.dupes - function(x){
is.dup - x %in% x[duplicated(x)]
is.con - c(x[-length(x)]==x[-1],F) | c(F,x[-length(x)]==x[-1])
is.dup !is.con}
On Mar 16, 2007, at 11:14 AM, Bruno C.. wrote:
Hello,
Given a
Considering that the vast majority of your time is spent in the function
mvrnorm (on my system 5.7 out of 6.1 seconds). In your example that is
12000 calls to the function. To improve your speed you have to cut down the
number of calls to the function. For example, how many unique integers do
Hi,
how do I create a coef.table as for example returned by summary.glm?
I don't see where the significance codes are assigned during summary.glm.
Thank you,
Benjamin
__
R-help@stat.math.ethz.ch mailing list
(My turn on the soapbox ...)
I'd like to add a bit of caveat to Bert's view. I'd argue (perhaps even
plead) that robust/resistant procedures be used with care. They should
not be used as a shortcut to avoid careful analysis of data. I recalled
that in my first course on regression, the
After successfully building R on Slackware Linux v11.0 I went to make
the documentation; the texi files went fine and then I hopefully issued
make dvi
after having gotten the warning to the effect of You cannot build the
DVI or PDF manuals during compilation. And, as expected I got the
error
I have found the function printCoefmat().
Thank you,
Benjamin
On 3/16/07, Benjamin Dickgiesser [EMAIL PROTECTED] wrote:
Hi,
how do I create a coef.table as for example returned by summary.glm?
I don't see where the significance codes are assigned during summary.glm.
Thank you,
Benjamin
Folks,
I have a matrix of historicalReturns, where entry (i, j) is the daily return
corresponding to date i and equity j. I also have a matrix startOffset,
where entry (1, k) is the row offset in historicalReturns where I entered
into equity k.
So we have that NCOL(startOffset) =
Hi,
Many thanks to Jim and Martin for their suggestions. Using your ideas,
I came up with a solution that indexes rather than uses sapply (and
therefore calling up mvrnorm separately for each cell in the matrix).
The trick is to create a key matrix once, and then to use the
match() function each
Dr. John Verzani will present his online course, Using R for Introductory
Statistics April 6 - May 4 at statistics.com. Participants can ask
questions and exchange comments with Dr. Verzani via a private discussion
board throughout the period.
This course covers the use of R to summarize and
Peter McMahan [EMAIL PROTECTED] writes:
Well, I hadn't ever seen RBGL before, so that's great. I've been
using igraph and sna mainly, but there are a few points lacking
between these two. RBGL solves a lot of problems for me!
But I'm not sure it will solve this specific problem. Are you
Thanks, I'll give it a try. does R have a limit on variable name
length? Also, is it better to over-estimate or under-estimate the
size parameter?
This won't be too hard to implement, either, as I'm already keeping
the list in a specific environment so all the subprocesses can find
the
I just tried it and there seems to be a limit of about 256 characters in a
variable name:
# worked
assign(paste(sample(letters,256,T), collapse=''),123,env=x)
# failed at 257 characters
assign(paste(sample(letters,257,T), collapse=''),123,env=x)
Error in assign(paste(sample(letters, 257, T),
Peter McMahan [EMAIL PROTECTED] writes:
Thanks, I'll give it a try. does R have a limit on variable name
length?
If you are going to have very long names, you might be better off
computing a digest of some kind. You could use the digest package to
compute an md5sum or the Ruuid package to
This might work for you:
returnsFromInception - sapply(1:NROW(historicalReturns), function(x){
cumsum(historicalReturns[startOffset[1, x] : n, x])
})
On 3/16/07, Murali Menon [EMAIL PROTECTED] wrote:
Folks,
I have a matrix of historicalReturns, where entry (i, j) is the daily
return
oops! I gave the wrong link - the correct one is
http://www.statistics.com/courses/Rstatistics/
pb
Dr. John Verzani will present his online course, Using R for Introductory
Statistics April 6 - May 4 at statistics.com. Participants can ask
questions and exchange comments with Dr. Verzani
Many thanks for the fast reply of Leeds
Here's all the anwer I got:
Here's the winner: Patrick Burns
with:
* any(duplicated(rle(x)$values))
followed by:
Peter McMahan:
non.contig.dupes - function(x){
is.dup - x %in% x[duplicated(x)]
is.con - c(x[-length(x)]==x[-1],F) | c(F,x[-length(x)]==x[-1])
# I have a simple function problem. I thought that I
could write a function to modify a couple of vectors
but I am doing something wrong
#I have a standard cost vector called fuel and some
adjustments to the
#costs called adjusts. The changes are completely
dependend on the length
#of the
Hi,
suppose I have data from 3 experiments which show conversion as a function of
time for different boundary conditions, e.g. pressure, temperature. I want to
plot all experiments as conversion over time grouped according to the
temperature. However, since I have more than one experiment
Is there a package (other than xgobi which requires an X server) that
will do scatterplot brushing? I see a mention in the mail archive of
R-orca by Anthony Rossini but it is not in the current list of
packages.
My OS is Windows XP version 5.1, service pack 2
R version 2.4.1 (2006-12-18)
On 3/16/07, Christel u. Frank Sarfert [EMAIL PROTECTED] wrote:
Hi,
suppose I have data from 3 experiments which show conversion as a function of
time for different boundary conditions, e.g. pressure, temperature. I want to
plot all experiments as conversion over time grouped according to the
You didn't specify the exact nature of the problem so I guess that you
want it return the vector cppm.
Add return(cppm) as the final line in function.
Here's what I think you want; it replicates your original code.
adjusts - c(.50, .70, .29, .27 , .40 , .26 , 125)
coal - 1:6
newdata - 1:10
Gurus,
Can I rely on the rownames() function, when applied to a matrix,
always returning either NULL or an object of type character? It
seems that row names can be entered as integers, but as of now
(R 2.4.1 on Windows) the function returns character vectors, not
numbers (which is my desired
Gabor,
Thanks. That helps a lot.
Gabor Grothendieck wrote:
On 3/16/07, Gabor Grothendieck [EMAIL PROTECTED] wrote:
1. Here is your example redone using proto:
library(proto)
parent - proto()
child - proto(a = 1)
parent$child1 - child
child$parent.env - parent
This last line should
Mike Prager [EMAIL PROTECTED] wrote:
Gurus,
Can I rely on the rownames() function, when applied to a matrix,
always returning either NULL or an object of type character? It
seems that row names can be entered as integers, but as of now
(R 2.4.1 on Windows) the function returns character
Suppose I create a multiple plot with zoo, using:
index - ISOdatetime(2004, rep(1:2, 5), sample(28, 10), 0, 0, 0)
foo - zoo(rnorm(10), index)
for (i in 1:9) {
data - rnorm(10)
z1 - zoo(data, index)
foo - cbind(foo, z1)
}
plot(foo)
This creates 10 plots on one device, one for each column in
I agree that most problems arise in the data management / file derivation
phase. From my reading of 21 CFR 11, it appears that this document focuses
primarily on data management (as well as on software directly involved in a
medical device) rather than on validation of statistical functions. I
I'm using R with emacs ESS on Windows. When I create a plot, sometimes R
will seem to get stuck in a busy loop, i.e. it will use 100% of my CPU.
However the system is still somewhat responsive, and the problem usually
goes away if I create a new device with windows(). If I then close this
device,
Try this (or use xyplot.zoo and write a panel function for that):
library(zoo)
set.seed(1)
tt - as.Date(paste(2004, rep(1:2, 5), sample(28, 10), sep = -))
foo - zoo(matrix(rnorm(100), 10), tt)
pnl - function(x, y, ...) {
lines(x, y, ...)
abline(h = mean(y))
}
plot(foo, panel =
Have a look at iplots. (and rggobi is the updated version of xggobi)
Hadley
On 3/16/07, Richard Valliant [EMAIL PROTECTED] wrote:
Is there a package (other than xgobi which requires an X server) that
will do scatterplot brushing? I see a mention in the mail archive of
R-orca by Anthony
I should mention that it's very easy to install rggobi and ggobi on
windows these days. GGobi has a nice installer,
http://www.ggobi.org/downloads, and rggobi is on cran.
Hadley
On 3/16/07, hadley wickham [EMAIL PROTECTED] wrote:
Have a look at iplots. (and rggobi is the updated version of
On 3/16/2007 6:56 PM, Jonathan Wang wrote:
I'm using R with emacs ESS on Windows. When I create a plot, sometimes R
will seem to get stuck in a busy loop, i.e. it will use 100% of my CPU.
However the system is still somewhat responsive, and the problem usually
goes away if I create a new
That's a good point. What's the overhead on digests like that? Also,
does that open up the possibility, exceedingly small though it may
be, of misidentifying a branch as already searched and missing a
qualifying subgraph?
On Mar 16, 2007, at 2:02 PM, Seth Falcon wrote:
Peter McMahan
Dear r-helpers,
When I do an xYplot and display the result in a JavaGD() window, the
font is sans-serif (presumably Helvetica). When I send the figure to
a pdf, I get a serif font (presumably times). How do I insure that
the font in the pdf is indeed the default sans serif?
sessionInfo()
Here's one possibility:
d - make.groups(v1,v2,v3)
## create interaction dropping unused levels
d$intg - with(d, which:factor(temp))[, drop=TRUE]
## extract experiment and temp information from levels
intg.expt - sapply(strsplit(levels(d$intg), :, fixed = TRUE), [[, 1)
intg.temp -
On Mar 16, 2007, at 6:26 PM, Mike Prager wrote:
Mike Prager [EMAIL PROTECTED] wrote:
Gurus,
Can I rely on the rownames() function, when applied to a matrix,
always returning either NULL or an object of type character? It
seems that row names can be entered as integers, but as of now
(R
I can't imagine using Windows without Emacs.
In particular, the Windows ports of Emacs are very aware
of the operating system and usually make the right assumptions.
The type of behavior you are noticing can probably be cured by typing C-g in the
*R* buffer in emacs. The most likely cause is
85 matches
Mail list logo