Displaying 20 results from an estimated 1000 matches similar to: "branch cuts of log() and sqrt()"
2004 Aug 19
0
nlme R vs S plus
Hi all,
I'm a PhD student at sydney uni and am trying to run a non linear mixed
model program to obtain estimates of parameters describing dairy cow
lactation curves. At present, I have been able to get the data to converge
using the S plus (S plus 2000) nlme function. However, when I put the same
data into R (R 1.9.0), add in the nlme package and run the code, it does
not converge by the
2006 May 17
1
for loops and counter interpolation
Hi
I'm sorry about the triviality of my problem. I have a vector (v) of three
columns (logA, logB, id). I want to compute (and plot) the correlation between
logA and logB for different thresholds of id (e.g. >30, etc). So I tried:
for(i in 1:100){
points(cor(v$logA[v$id>i], v$logB[v$id>i], use="complete.obs"), i))
}
(i created a plot object already)
but it comes with
2005 Feb 02
3
publishing random effects from lme
Dear all,
Suppose I have a linear mixed-effects model (from the package nlme) with
nested random effects (see below); how would I present the results from
the random effects part in a publication?
Specifically, I?d like to know:
(1) What is the total variance of the random effects at each level?
(2) How can I test the significance of the variance components?
(3) Is there something like an
2005 Feb 02
1
random effects in lme
Dear all,
Suppose I have a linear mixed-effects model (from the package nlme) with
nested random effects (see below); how would I present the results from
the random effects part in a publication?
Specifically, I?d like to know:
(1) What is the total variance of the random effects at each level?
(2) How can I test the significance of the variance components?
(3) Is there something like an
2013 Nov 07
1
R interface to C API Rf_logspace_{add,sub}?
Is there an R-language interface to the R API C-language functions Rf_logspace_add()
and Rf_logspace_sub()? I don't see one but I may not looking under the
right name.
Various packages have functions which do that same sort
of thing (log(exp(x)+exp(y)) and log(exp(x)-exp(y)) without unnecessary
floating point errors). They have names like
matrixStats::logSumExp(lx, na.rm=FALSE, ...)
2010 Jan 19
2
Help deciphering segfault in make check
Dear R Help,
I work with the Sage project, and we are trying to improve the ability
to use R through Sage. Most things work, but make check seems to
cause problems on certain platforms, and now that we want to upgrade
to 2.10.1 I thought we should ask for help!
R builds just fine on both Mac and Linux, but some things in make
check seem to break on certain Linux boxes that don't on Mac or
2003 Oct 29
1
I have a problem with the log2 function
Dear R users,
according the help(log), the function
log2(x) should give the natural logarithm of x.
I expect in case of x=2 to to get 0.6931, however, R gives me 1 as a result.
Similar, logb(2,2) gives 1 again.
I'm wondering if I have missed something ?
Yours
Frank
--
Frank Mattes, MD e-mail: f.mattes at ucl.ac.uk
Department of Virology fax 0044(0)207 8302854
Royal Free Hospital
2006 Apr 06
1
R CMD check for packages in a bundle
Hi
[MacOsX 10.4.6; R-2.2.1]
I have a bundle that comprises three packages. I want to run R CMD
check on
each one individually, as it takes a long time to run on all three.
I am
having problems.
The bundle as a whole passes R CMD check, but fails when I cd to the
bundle
directory and run R CMD check on a package directory.
The whole bundle passes:
octopus:~/scratch% R CMD check
2004 Jul 05
1
"make" error for R-1.9.1
Hello everybody.
I am trying to upgrade from R-1.9.0 to R-1.9.1 on a RedHat linux
2.4.18 system. I get
the following error after "tar -xvzf R-1.9.1.tgz ; cd ./R-1.9.1/ ; ./configure"
and "make" :
[make works for 10 minutes ... snip ...]
varExp text html latex
varFixed text html latex
varFunc
2005 May 16
1
branch cuts of atan()
Hi
the following gave me a shock:
> atan(2)
[1] 1.107149
> atan(2+0i)
[1] -0.4636476+0i
>
or, perhaps more of a gotcha:
> atan(1.0001+0i)
[1] -0.7853482+0i
> atan(0.9999+0i)
[1] 0.7853482+0i
>
evidently atan()'s branch cuts aren't where I thought they were.
Where do I look for documentation on this?
--
Robin Hankin
Uncertainty Analyst
National
2011 Mar 21
1
round, unique and factor
Survfit had a bug in some prior releases due to the use of both
unique(times) and table(times); I fixed it by rounding to 15 digits per
the manual page for as.character. Yes, I should ferret out all the
usages instead, but this was fast and it cured the user's problem.
The bug is back! A data set from a local colleage triggers it.
I can send the rda file to anyone who wishes.
The
2007 Nov 28
1
Histograms and Sturges rule
Dear All,
According to the Sturges rule, the number of classes of a histogram is
the closest integer to
1 + logb(n,base=2)
where n is the number of observations. The function hist(), by
default, uses the Sturges rule. However, the code
x <- 1:200
hist(x)
produces a histogram with 10 classes and not 9 classes as determined
by the Sturges rule. What am I missing?
Thanks in advance,
Paul
2004 Jul 06
1
vectorizing sapply() code (Modified by Aaron J. Mackey)
[ Not sure why, but the first time I sent this it never seemed to go
through; apologies if you're seeing this twice ... ]
I have some fully functional code that I'm guessing can be done
better/quicker with some savvy R vector tricks; any help to make this
run a bit faster would be greatly appreciated; I'm particularly stuck
on how to calculate using "row-wise" vectors
2009 May 04
1
wrong if-else syntax
What is wrong in the following nested if-else statements:
if (Condition_1) { # begin IF_1
statement_1
statement_2
statement_3
if (Condition_2) { # begin IF_2
a<- a +1
} # end IF_2
statement_4
statement_5
statement_6
statement_7
if (Condition_3) {
2011 May 17
2
can not use plot.Predict {rms} reproduce figure 7.8 from Regression Modeling Strategies (http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf)
Dear R-users,
I am using R 2.13.0 and rms 3.3-0 , but can not reproduce figure 7.8 of the
handouts *Regression Modeling Strategies* (
http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf) by the
following code. Could any one help me figure out how to solve this?
setwd('C:/Rharrell')
require(rms)
load('data/counties.sav')
older <- counties$age6574 + counties$age75
2004 Jul 08
1
parallel mle/optim and instability
I have a MLE task that for a small number of parameters finishes in a
reasonable amount of time, but for my "real" case (with 17 parameters
to be estimated) either takes far too long (over a day), or fails with
"computationally singular" errors. So a) are there any parallel
implementations of optim() (in R or otherwise) and b) how can I make my
function more robust?
2006 Sep 21
1
printing of complex numbers in R-alpha
Hello everyone
I am finding complex numbers to be printed oddly in R-alpha.
> 1e100+1e100i
[1] 1e+100+1e+100i
> 1e100 + 1e44i
[1] 1e+100+100000000000000008821361405306422640701865984i
> dput(1e100+1e44i)
1e+100+100000000000000008821361405306422640701865984i
>
[same thing at home on a linux box]
The first line is what I would expect, the second and third lines
aren't:
I
2004 Nov 18
0
Fwd: Re: 3d scatter plot with drop line
Hi
try this:
p3dpairs <- function(x,x1,
xlim=NULL,ylim=NULL,zlim=NULL,col=par("col"), pch=par("pch"),
cex=par("cex"), ...){
if(is.matrix(x)){
z <- x[,3]
y <- x[,2]
x <- x[,1]
}
if(is.matrix(x1)){
z1 <- x1[,3]
y1 <- x1[,2]
x1 <- x1[,1]
}
if(missing(zlim)) {
z.grid <-
2005 Jul 15
0
new package: elliptic
Hi
I recently uploaded package "elliptic" to CRAN. From the DESCRIPTION
file, it is:
A suite of elliptic and related functions including
Weierstrass and Jacobi forms. Also includes various
tools for manipulating and visualizing complex
functions.
enjoy
rksh
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre,
2005 Oct 21
0
new package bundle: onion
Dear List
I have just uploaded a new package, "onion", to CRAN.
It provides some functionality for manipulating and visualizing
quaternions
and octonions.
All comments welcome!
enjoy
rksh
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
_______________________________________________