Dear David,
does the following work for you?
sVec - c(lema, rb 2%, rb 2%, rb 3%, rb 4%, rb 3%, rb 2%,mineuse,
rb, rb,
rb 12, rb, rj 30%, rb, rb, rb 25%, rb, rb, rb, rj, rb)
reVec - regexpr([[:digit:]]+, sVec)
# see ?regex for details on '[:digit:]' and '+'
substr(sVec ,start = reVec,
Hi Bill,
have a look at the following artificial example:
## Loading the package 'drc' (on CRAN)
library(drc)
## Generating dataset with four dose-response curves
finneyx4 - rbind(finney71, finney71, finney71, finney71)
## Generating artificial points (x,y)
## different pairs for each of the 4
The Statistics Group at the Department of Natural Sciences, Faculty of Life
Sciences,
University of Copenhagen, is looking for a research assistant with R skills.
For details see: http://www.matfys.kvl.dk/~torbenm/eu
Please note that the deadline for applications is June 22 2007.
Christian
Hi Kate,
try looking at the package 'drc' on CRAN and in particular look at the
example in the help page for the dataset 'daphnids' (?daphnids).
You can obtain arbitrary ED values with approximate standard errors
using the function 'ED'.
Christian
Hi,
try using the function 'glm.control' in the first place:
glm(n~., data = mDat, family = poisson,
control = glm.control(trace = TRUE))
Christian
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Hi,
the following R lines work fine in R 2.4.0, but not in R 2.4.1 or any devel
versions of R
2.5.0 (see below for details).
library(drc) # to load the dataset 'PestSci'
library(nlme)
## Setting starting values
sv - c(0.43355869, 2.49963220, 0.05861799, 1.73290589, 0.38153146, 0.24316978)
Hi Lauri,
here is a little modification of the solution for retrieving the last
row only :
score[as.vector(unlist(tapply(rownames(score), score$id, tail, 2))),]
giving the last two rows. Replacing 2 by 6 or 10 gives you the last 6
or 10 rows (if they exist).
Christian
Hi,
the following R lines work fine in R 2.4.0 alpha (and older R versions), but
not in R
2.4.0 beta (details below):
library(drc) # to load the dataset 'PestSci'
library(nlme)
## Starting values
sv - c(0.328919, 1.956121, 0.097547, 1.642436, 0.208924)
## No error
m1 - nlme(SLOPE ~ c +
Hi,
the contributed package 'drc' allows specification of non-linear regression
models with
individual parameter models that include covariates.
For an example see section 8 the accompanying paper in J. Statist. Software
(http://www.jstatsoft.org/v12/i05/v12i05.pdf).
Christian
Hi Michael,
use: extractAIC to get AIC from an lm object:
y - rnorm(10)
extractAIC(lm(y~1))
Christian
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Hi.
Try compute the correlation for the transposed data frame:
cor( t(person.data), use=pairwise.complete.obs )
Assuming that your data frame person.data contains NAs to indicate
where no value is available, I think the following computation yields N:
(!is.na(person.data)) %*%
Hi JJ,
try the following function in R:
citation()
Christian
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Hi Lorenzo,
maybe the following example is of use?
a - matrix(1:25,5,5)
stack(as.data.frame(a[, c(1,3,5,2,4)]))
Note that 'stack' takes a data frame or list as first argument (not a
matrix). Therefore the matrix is first converted to a data frame using
'as.data.frame'.
Christian
Hi Jinsong,
you can use the package drc on CRAN to fit logit and Weibull models
(but not the probit model) with natural mortality/response and/or
natural immunity to binomial data (maximum likelihood estimation).
To get an idea try:
library(drc)
?earthworms
Christian
Hi Manuel,
an alternative to the approach pointed out by Prof. Ripley is to use
the package 'drc' which allows one or more parameters in a non-linear
regression model to depend on a factor.
You will need the latest version available at www.bioassay.dk (an older
version is available on CRAN).
Hi Katie,
maybe the easiest solution is to create a new factor that corresponds to
the combinations of the three factors A, B and C. A quick and dirty way
to create such a factor is:
ABC - factor(paste(A, x, B, x, C, sep = ))
ABC
and then fit the model using the variable ABC instead of A*B*C.
Hi Quin,
the package 'drc' on CRAN deals with modelling dose-response curves.
Moreover it allows adjustment for heterogeneity by means of
transformation (Box-Cox transformation)
modelling the variance as a power of the mean.
See the package documentation for more features.
Christian
Hi!
Yes, the 'drc' package can be used to obtain IC50 or any other ICx value
for several, commonly used dose-response models.
The vignette is more up-to-date than the article in JSS (which dates
back to the start of 2005).
Christian
Liaw, Andy wrote:
Perhaps also of interest is the `drc'
Hi Spencer.
When using 'optim' and the first try fails you could:
1) try some other methods: Nelder-Mead, BFGS, ...
2) increase the maximum number of iterations (argument maxit in the control
list)
3) specify the argument parscale in the control list, in order to have all
parameters of same
Hi.
An alternative is to use the package 'drc' on CRAN to fit your data!
x - 1:100
y - c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,2,2,2,2,2,3,4,4,4,5,
5,5,5,6,6,6,6,6,8,8,9,9,10,13,14,16,19,21,
24,28,33,40,42,44,50,54,69,70,93,96,110,127,127,141,157,169,
Hi Patrick,
try:
lm.res.2$coefficients
which I found by looking at the content of the function 'summary.lm'.
Christian
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Hi Ariel,
ok, you want to change the language?
Right click on the R icon on the desktop, choose Properties. In the
field Destination you add at the end of the line:
language=it (Italian) orlanguage=fr (French)
Then the line should look somewhat like: (for Italian)
Hi Angelo,
have a look at the following example which uses 'gls' in the nlme package.
library(nlme)
x - runif(100, 0, 1)
y - x + exp(4*x)*rnorm(100, 0, 2)
gls(y~x, correlation = varExp(form=~x))
For details see ?gls and ?varExp.
Christian
__
Hi.
I think there may be one or more zeros in your data set, causing the
problem:
x - rgamma(100)
fitdistr(x, weibull)
fitdistr(c(x,0), weibull)
Maybe you should omit the zeros.
Christian
__
[EMAIL PROTECTED] mailing list
Hi,
try something like:
lme(y~w,random=list(~1|year,~1+w|site))
Christian
- Original Message -
From: John Fieberg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 10:36 PM
Subject: [R] lme parameterization question
Hi,
I am trying to parameterize the
25 matches
Mail list logo