similar to: confint() in stats4 package

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"
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
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
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]
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
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:
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) >
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
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
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 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]
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(). >
2012 Oct 30
4
There is pmin and pmax each taking na.rm, how about psum?
Hi, Please consider the following : x = c(1,3,NA,5) y = c(2,NA,4,1) min(x,y,na.rm=TRUE) # ok [1] 1 max(x,y,na.rm=TRUE) # ok [1] 5 sum(x,y,na.rm=TRUE) # ok [1] 16 pmin(x,y,na.rm=TRUE) # ok [1] 1 3 4 1 pmax(x,y,na.rm=TRUE) # ok [1] 2 3 4 5 psum(x,y,na.rm=TRUE) [1] 3 3 4 6 # expected result Error: could not find function "psum" # actual result
2010 Mar 29
1
Suggestion: Adding quick rowMin and rowMax functions to base package
Hi, I wonder whether similarly to the very quick rowSums and colSums functions in the base package, one could add quick functions that calculate the min or max over rows / cols in a matrix. While apply(x,1,min) works, I found out by profiling a program of mine that it is rather slow for matrices with a very large number of rows. A quick functionality seems to be already there in the
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
2008 Jul 04
0
RES: initialize a matrix
You have to put the tml in the function and deltat too. like VAR<-function(power,length,deltat,tml){ -----Mensagem original----- De: r-help-bounces em r-project.org [mailto:r-help-bounces em r-project.org]Em nome de mysimbaa Enviada em: sexta-feira, 4 de julho de 2008 11:22 Para: r-help em r-project.org Assunto: [R] initialize a matrix Dear R users, I'm trying to write a function
2011 Oct 04
1
a question about sort and BH
Hi, I have two questions want to ask. 1. If I have a matrix like this, and I want to figure out the rows whose value in the 3rd column are less than 0.05. How can I do it with R. hsa-let-7a--MBTD1 0.528239197 2.41E-05 hsa-let-7a--APOBEC1 0.507869409 5.51E-05 hsa-let-7a--PAPOLA 0.470451884 0.000221774 hsa-let-7a--NF2 0.469280186 0.000231065 hsa-let-7a--SLC17A5
2015 Mar 25
3
[LLVMdev] Optimization puzzle...
Here's a version that doesn't try to do block deletion on it's own. If you use -adce then -simplifycfg, you get what you want. It passes all tests except one, which is that we delete an invoke of a pure function, IE Transforms/ADCE/dce_pure_invoke.ll - I'm not sure why that's bad. The reason we delete it is because it returns false to I.mayHaveSideEffects(), and in particular,
2005 Apr 14
1
predict.glm(..., type="response") loses names (was RE: [R] A sugg estion for predict function(s))
> From: Ross Darnell > > Liaw, Andy wrote: > >>From: Liaw, Andy > >> > >> > >>>From: Ross Darnell > >>> > >>>A good point but what is the value of storing a large set of > >>>predicted > >>>values when the values of the explanatory variables are lost > >>>(predicted >