Displaying 20 results from an estimated 400 matches similar to: "Using deriv3() in a separated nonlinear regression model"
2011 Jun 01
1
xtable with conditional formatting using \textcolor
Hello list,
I'm doing a table with scores and I want include colors to represent status
of an individual. I'm using sweave <<results=tex>>= and xtable but I can't
get a result I want. My attemps are
#-----------------------------------------------------------------------------
# code R
da <- data.frame(id=letters[1:5], score=1:5*2)
col <- function(x){
2012 Nov 05
0
Diference in results from doBy::popMeans, multcomp::glht and contrast::contrast for a lme model
Hello R users,
I'm analyzing an experiment in a balanced incomplet block design (BIB). The
effect of blocks are assumed to be random, so I'm using nlme::lme for this.
I'm analysing another more complex experiments and I notice some diferences
from doBy::popMeans() compared multcomp::glht() and contrast::contrast().
In my example, glht() and contrast() were equal I suspect popMeans()
2011 Jun 02
4
Use line break at scrip but avoid line break on graphics
Hello list,
I have plots with long strings in main=, ylab= or xlab=. So, in I my script
I use break long lines to avoid lines hiden on my monitor and in sweave
document pages. I use graphics like this
plot(1, main="aaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbb")
but I would like a plot result like this
plot(1, main="aaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbb")
I
2011 Aug 06
1
multcomp::glht() doesn't work for an incomplete factorial using aov()?
Hi R users,
I sent a message yesterday about NA in model estimates (
http://r.789695.n4.nabble.com/How-set-lm-to-don-t-return-NA-in-summary-td3722587.html).
If I use aov() instead of lm() I get no NA in model estimates and I use
gmodels::estimable() without problems. Ok!
Now I'm performing a lot of contrasts and I need correcting for
multiplicity. So, I can use multcomp::glht() for this.
2011 Aug 06
1
How set lm() to don't return NA in summary()?
Hi,
I've data from an incomplete fatorial design. One level of a factor doesn't
has the levels of the other. When I use lm(), the summary() return NA for
that non estimable parameters. Ok, I understant it. But I use
contrast::contrast(), gmodels::estimable(), multcomp::glht() and all these
fail when model has NA estimates. This is becouse vcov() and coef() has
different dimensions. Is
2012 Apr 11
1
Lattice densityplot with semitransparent filled regions
Hello,
I'm doing some graphics for a paper and a need customize such with filled
region above the density curve. My attempts I get something very near what
I need, but I don't solve the problem of use semitransparent filled. Below
a minimal reproducible code. Someone has any idea?
require(lattice)
# toy data...
dt <- expand.grid(A=1:2, B=1:3, y=1:50)
dt$y <- rnorm(nrow(dt), dt$B,
2011 Feb 15
1
ternary contour plot
Colin,
If your propose is to create a ternary plot with points and vectors, I think easier do this with graphics based plots instead of trellis based plots. Although, with little work you can do with trellis too. I gave you a reproducible code to put an arrow in a ternary plot. I use the function locator() to extract coordinates. The code is the following
2004 Mar 24
1
Question on deriv3()
Hello:
Why is deriv3() functioning differently in R from that in Splus
using library(MASS) ? For example
deriv3(~(t1*log(t2)+lgamma(t1)+(1-t1)*log(y)+y/t2),c("t1","t2"),function(y,t1,t2)NULL)
complains of lgamma.
Mervyn
2001 May 06
1
deriv3 example on Venables/Ripley page 263
What does it require to run the example on page 263
of Venables/Ripley book using R 1.3.0?
I got the following error and I have no clue how to correct it.
Thank you very much. (If you reply to the list, please send a
copy to me.)
> lmix2 <- deriv3(
+ ~ -log(p*dnorm((x-u1)/s1)/s1 + (1-p)*dnorm((x-u2)/s2)/s2),
+ c("p", "u1", "s1", "u2",
2002 Mar 11
1
problem with deriv3?
Using S+ 6 for Linux and
R 1.4.1
Taking verbatim some lines from S-Plus that work
perfectly, and running them on R, I get an
unexpected error message:
R : Copyright 2002, The R Development Core Team
Version 1.4.1 (2002-01-30)
> library(MASS)
> data <- read.table("/usr/local/data/mcmanus.dat",header=T)
> mcmanus.frm <-
2007 Oct 14
1
Extending deriv3()
Hello,
I was wondering if the functions deriv3(), deriv() etc. could be extended
to handle psigamma() and its special cases (digamma(), trigamma()
etc.). From the error message it seems that 'psigamma' needs to be
added to the derivatives table.
This might be easy since psigamma() has a deriv argument.
Additionally, this error message is also obtained when requesting for
the Hessian of
2017 Feb 17
1
Wish List: Extensions to the derivatives table
The issue is that without an extensible derivative table or the proposed extensions, it is not possible to automatically produce (without manual modification of the deriv3 output) a function that avoids catastrophic cancellation regardless of the working range.
Manual modification is not onerous as a one-time exercise, but can be time consuming when it must be done numerous times, for example
2007 Mar 20
2
Problems about Derivaties
Dear participants to the list,
this is my problem: I want to obtain an expression that represents the second
derivative of one function.
With "deriv3" (package "stats") it is possible to evaluate the second
derivative, but I do not know how I can get the (analytical) expression of this
derivative.
For example: Suppose that I have a function of this form:
2017 Feb 17
0
Wish List: Extensions to the derivatives table
Hi.
Unless I'm misremembering, log, exp, sin, cos, and tan are all handled in
deriv3. The functions listed are specially coded slightly more accurate
versions but can be substituted with native ones for which deriv/deriv3
will work automatically. I believe that if you write your functions using
log(a + 1) instead of log1p(a) or log(x) / log(2) instead of log2(x) deriv3
will work fine.
2007 Jul 30
2
deriv, loop
Hi, 2 questions:
Question 1: example of what I currently do:
for(i in 1:6){sink("temp.txt",append=TRUE)
dput(i+0)
sink()}
x=scan(file="temp.txt")
print(prod(x))
file.remove("C:/R-2.5.0/temp.txt")
But how to convert the output of the loop to a vector that I can manipulate
(by prod or sum etc), without having to write and append to a file?
Question 2:
>
1998 Jan 12
0
Symbolic derivation
Wenyaun Xi <xi@keynes.econ.utah.edu> writes to S-news:
> I ran into some problems when I tried to get symbolic derivation by
> using a function deriv3(). The expression contains 18
> parameters, of which I want to have an information matrix eventually. I
> ran it on my 200MHz Pentium PC with 64meg RAM. Each time I kick out the
> job, the S-plus 3.1 for Windows stops after
2017 Mar 31
1
User profiles question
Hi,
I'm facing an issue where most users receive the error "The Group Policy Client service
failed the logon. Access denied.". The fix so far is to delete a registry folder on the
client machine, but there are cases where this does not work. For one user, I had to
delete the account and create it again. The domain uses 3 centos7 + samba 4.5.5, with a
fileserver running 4.4.4.
2017 Feb 17
4
Wish List: Extensions to the derivatives table
The derivative table resides in the function D. In S+ that table is extensible because it is written in the S language. R is faster but less flexible, since that table is programmed in C. It would be useful if R provided a mechanism for extending the derivative table, or barring that, provided a broader table. Currently unsupported mathematical functions of one argument include expm1, log1p,
2010 Feb 17
2
How to provide a result from D(f(x), "x") to a curve(f'(x)) ???
Hi all,
I want to provide the result from D() to curve(), because I want to plot the k-th derivative of some functions. Actually, I copy from console the result given by D() and paste inside curve(). With a lot of functions and high degree differentiation this process is tedious. Can I provide directly??
# what I actually have done (very simple function)
D(expression(x^3), "x") # copy
2010 May 26
1
Is possible a mini-plot into a big plot with Lattice?
Hello,
I want to do with Lattice functions (qqmath, histogram) a figure like this below.
n <- 1000
x <- rnorm(n)
qqnorm(x); qqline(x)
op <- par(fig=c(.02,.5,.5,.98), new=TRUE)
hist(x, xlab="", ylab="", main="", axes=FALSE)
box()
par(op)
Is possible?
Thanks.
Walmes Zeviani.
_________________________________________________________________