Displaying 20 results from an estimated 4000 matches similar to: "confint() in stats4 package"
2019 Apr 24
1
Bug in "stats4" package - "confint" method
Dear R developers,
I noticed a bug in the stats4 package, specifically in the confint method applied to ?mle? objects.
In particular, when some ?fixed? parameters define the log likelihood, these parameters are stored within the mle object but they are not used by the ?confint" method, which retrieves their value from the global environment (whenever they still exist).
Sample code:
>
2024 May 22
1
confint Attempts to Use All Server CPUs by Default
Following up on this -- on my system, I have 69 packages installed
that appear to provide something like a confint() method:
h <- help.search("confint", agrep = FALSE)
p <- sort(unique(h$matches$Package))
length(p)
## [1] 69
p
[1] "bamlss" "bbmle" "binom" "brglm2"
[5] "broom"
2005 Jul 21
1
About object of class mle returned by user defined functions
Hi,
There is something I don't get with object of class "mle" returned by a
function I wrote. More precisely it's about the behaviour of method
"confint" and "profile" applied to these object.
I've written a short function (see below) whose arguments are:
1) A univariate sample (arising from a gamma, log-normal or whatever).
2) A character string
2008 Sep 04
1
pass data to log-likelihood function
Hi there,
When I do bootstrap on a maximum likelihood estimation, I try the
following code, however, I get error:
Error in minuslogl(alpha = 0, beta = 0) : object "x" not found
It seems that mle() only get data from workspace, other than the
boot.fun().
My question is how to pass the data to mle() in my case.
I really appreciated to any suggestions.
Best wishes,
Jinsong
2024 May 21
1
confint Attempts to Use All Server CPUs by Default
? Tue, 21 May 2024 08:00:11 +0000
Dario Strbenac via R-devel <r-devel at r-project.org> ?????:
> Would a less resource-intensive value, such as 1, be a safer default
> CPU value for confint?
Which confint() method do you have in mind? There is at least four of
them by default in R, and many additional classes could make use of
stats:::confint.default by implementing vcov().
>
2005 Apr 14
0
predict.glm(..., type="response") dropping names (and a propsed (PR#7792)
Here's a patch that should make predict.glm(..., type="response") retain the
names. The change passes make check on our Opteron running SLES9. One
simple test is:
names(predict(glm(y ~ x, family=binomial,
data=data.frame(y=c(1, 0, 1, 0), x=c(1, 1, 0, 0))),
newdata=data.frame(x=c(0, 0.5, 1)), type="response"))
which gives
[1]
2010 Jul 31
2
Is profile.mle flexible enough?
Hi the list,
I am experiencing several issues with profile.mle (and consequently with
confint.mle) (stat4 version 2.9.2), and I have to spend a lot of time to
find workarounds to what looks like interface bugs. I would be glad to
get feedback from experienced users to know if I am really asking too
much or if there is room for improvement.
* Problem #1 with fixed parameters. I can't
2005 Dec 20
0
pmin(), pmax() - slower than necessary for common cases
A few hours ago, I was making a small point on the R-SIG-robust
mailing list on the point that ifelse() was not too efficient
in a situation where pmax() could easily be used instead.
However, this has reminded me of some timing experiments that I
did 13 years ago with S-plus -- where I found that pmin() /
pmax() were really relatively slow for the most common case
where they are used with only
2006 Jan 19
1
nls profiling with algorithm="port" may violate bounds (PR#8508)
[posted to R-devel, no discussion:
resubmitting it as a bug, just so it gets
logged appropriately]
Sorry to report further difficulties with
nls and profiling and constraints ... the problem
this time (which I didn't check for in my last
round of testing) is that the nls profiler doesn't
seem to respect constraints that have been
set when using the port algorithm.
See test code
2008 Jul 04
2
create a zero matrix & fill
Dear R user,
I have written a function which returns max,min and variation of a power
(see below)
Power is a given matrix(1,n)
I call the function
>Variation<-VAR(p,(n-deltat))
Now the problem is when I want plot(Results[1],Results[2]). Not possible!
I become the following error (in english it means: Error in
as.double.default(x) :Object cannot be transformed in double)
>
2003 Jan 31
2
minor error in documentation of pmax in base (PR#2513)
The documentation says, "pmax and pmin take several vectors as
arguments and return a single vector giving the parallel maxima
(or minima) of the vectors."
I discovered that, if you use a matrix or array instead of a
vector, pmax returns a matrix or array, respectively.
This makes pmax and pmin much more useful, and should not be left
to people to discover on their own!
For example:
2015 Dec 24
0
override pmin/pmax for my own matrix
Yes, functions like c, min and max are special cases, as they are
primitives. For ordinary functions, you just need to promote them with
"..." as the signature:
setGeneric("pmax", signature="...")
setMethod("pmax", "Class", function(..., na.rm=FALSE) { })
One caveat is that all arguments passed via "..." must derive from the
class
2008 Feb 12
1
Namespace/method oddity
I stumbled on the following:
> library(stats4)
> example(mle)
> confint.default(fit2)
Error in UseMethod("vcov") : no applicable method for "vcov"
In addition: Warning message:
In object$coefficients :
$ operator not defined for this S4 class, returning NULL
> vcov(fit2)
lymax lxhalf
lymax 0.02857612 -0.04870231
lxhalf -0.04870231 0.11457338
2015 Mar 25
2
[LLVMdev] Optimization puzzle...
Hi everyone,
I am wondering what¹s stopping the LLVM optimizer (opt -O3) from
eliminating the apparently useless « icmp sgt » instruction in the
following piece of LLVM IR.
> ; ModuleID = 'lambda-opt.bc'
> target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
> target triple = "x86_64-apple-macosx10.10.0"
>
> ; Function
2004 Jul 13
2
confint.glm in a function
I can't get confint.glm to work from within a function. Consider
the following (using R 1.9.1, Windows 2000):
# FIRST: SOMETHING THAT WORKS FROM A COMMAND PROMPT
DF <- data.frame(y=.1, N=100)
(fit <- glm(y~1, family=binomial, data=DF,
weights=DF[,"N"]))
Call: glm(formula = y ~ 1, family = binomial, data = DF, weights =
DF[, "N"])
Coefficients:
2018 Jul 20
0
Should there be a confint.mlm ?
>>>>> steven pav
>>>>> on Thu, 19 Jul 2018 21:51:07 -0700 writes:
> It seems that confint.default returns an empty data.frame
> for objects of class mlm. For example:
> It seems that confint.default returns an empty data.frame for objects of
> class mlm.
Not quite: Note that 'mlm' objects are also 'lm' objects, and so
it is
2015 Dec 24
2
override pmin/pmax for my own matrix
Hello,
I'm trying to override pmin and pmax for my own matrix. These two
functions have ... as an argument. I tried to override them as
follows:
setMethod("pmax", class_name, function(x, ..., na.rm) { ... })
I use this way to override primitive functions such as min/max and it
works fine.
But it doesn't work for pmin and pmax. I guess because they are
regular functions?
How
2008 Dec 19
0
"parm" argument in confint.multinom () nnet package
Dear R users,
The nnet package includes the multinom method for the confint function.
The R Help file (?confint) for the generic function in the stats package
and the help files for the glm and nls methods in the MASS package
indicate that one can use the "parm" argument as "a specification of
which parameters are to be given confidence intervals, either a vector
of numbers or
2008 Jul 04
1
initialize a matrix
Dear R users,
I'm trying to write a function which returns minimum,maximum,mean of a
vector(power)
I've done the following :
VAR<-function(power,length){
for(i in tml:length)){
tvar[i]<-i
pmean[i]<-mean(power[i:i+deltat])
pmin[i]<-min(power[i:i+deltat])
pmax[i]<-max(power[i:i+deltat])
varmax[i]<-100*(pmax[i]-pmean[i])/pmean[i]
2006 Jan 17
0
nls profile with port/constraints
Sorry to report further difficulties with
nls and profiling and constraints ... the problem
this time (which I didn't check for in my last
round of testing) is that the nls profiler doesn't
seem to respect constraints that have been
set when using the port algorithm.
See test code below ...
If I can I will try to hack the code, but I will
probably start by redefining my function with