similar to: importing a function, generic conflicts

Displaying 20 results from an estimated 10000 matches similar to: "importing a function, generic conflicts"

2010 May 18
1
BIC() in "stats" {was [R-sig-ME] how to extract the BIC value}
>>>>> "MM" == Martin Maechler <maechler at stat.math.ethz.ch> >>>>> on Tue, 18 May 2010 12:37:21 +0200 writes: >>>>> "GaGr" == Gabor Grothendieck <ggrothendieck at gmail.com> >>>>> on Mon, 17 May 2010 09:45:00 -0400 writes: GaGr> BIC seems like something that would logically go into stats
2008 Dec 19
0
What BIC is calculated by 'regsubsets'?
The function 'regsubsets' appears to calculate a BIC value that is different from that returned by the function 'BIC'. The latter is explained in the documentation, but I can't find an expression for the statistic returned by 'regsubsets'. Incidentally, both of these differ from the BIC that is given in Ramsey and Schafer's, The Statistical Sleuth. I assume
2005 Oct 16
1
BIC doesn't work for glm(family=binomial()) (PR#8208)
Full_Name: Ju-Sung Lee Version: 2.2.0 OS: Windows XP Submission from: (NULL) (66.93.61.221) BIC() requires the attribute $nobs from the logLik object but the logLik of a glm(formula,family=binomial()) object does not include $nobs. Adding attr(obj,'nobs') = value, seems to allow BIC() to work. Reproducing the problem: library(nmle); BIC(logLik(glm(1~1,family=binomial())));
2008 Sep 24
2
Error message when calculating BIC
Hi All, Could someone help me decode what this error means ? > BIC(nb.80) Error in log(attr(object, "nobs")) : Non-numeric argument to mathematical function > BTW, nb.80 is a negative binomial glm model created using the MASS library with the call at the bottom of the message In the hopes of trying to figure this out I tried the following workaround but it did not work
2004 Jul 03
0
do_optimhess vs. fdHess ...
Quick question: poking around and comparing the performance of do_optimhess (C code within optim.c) and fdHess (in the nlme package), it looks like do_optimhess evaluates an n-parameter function (2*n)^2 times, while fdHess evaluates it (n+1)*(n+2)/2 times, to find a numeric estimate of the Hessian -- and only (n^2+1) of do_optimhess's evaluations are for unique values of the parameters. Is
2017 Jun 08
1
stepAIC() that can use new extractAIC() function implementing AICc
I would like test AICc as a criteria for model selection for a glm using stepAIC() from MASS package. Based on various information available in WEB, stepAIC() use extractAIC() to get the criteria used for model selection. I have created a new extractAIC() function (and extractAIC.glm() and extractAIC.lm() ones) that use a new parameter criteria that can be AIC, BIC or AICc. It works as
2006 Apr 25
1
summary.lme: argument "adjustSigma"
Dear R-list I have a question concerning the argument "adjustSigma" in the function "lme" of the package "nlme". The help page says: "the residual standard error is multiplied by sqrt(nobs/(nobs - npar)), converting it to a REML-like estimate." Having a look into the code I found: stdFixed <- sqrt(diag(as.matrix(object$varFix))) if (object$method
2011 Feb 28
0
lme error message: Error in getGroups.data.frame(dataMix, groups) :
Windows XP R 2.10 I am trying to run lme and get the following error: > fitRandom <- lme(values ~ subject, + data=withindata) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups my data follows, below which is a copy of all my code > > print(withindata) subject values 1 1 2.3199639 2 1 -8.5795802 3 1 -4.1901241 4
2012 Sep 19
0
Discrepancies in weighted nonlinear least squares
Dear all, I encounter some discrepancies when comparing the deviance of a weighted and unweigthed model with the AIC values. A general example (from 'nls'): DNase1 <- subset(DNase, Run == 1) fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1) This is the unweighted fit, in the code of 'nls' one can see that 'nls' generates a vector
2013 Feb 12
0
Deviance and AIC in weighted NLS
Dear All, I encounter some discrepancies when comparing the deviance of a weighted and unweigthed model with the AIC values. A general example (from 'nls'): DNase1 <- subset(DNase, Run == 1) fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1) Now for a weighted fit: fm2DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal),
2013 Jan 22
1
fdHess function
Your question is better addressed to the R-help@R-project.org mailing list, which I am copying on this reply. You are confusing a statistical concept, the Fisher Information matrix, with a numerical concept, the Hessian matrix of a scalar function of a vector argument. The Fisher information matrix is the Hessian matrix of a particular function at its optimum and I have forgotten whether that
2012 Jan 20
1
nobs() and logLik()
Dear all, I am studying a bit the various support functions that exist for extracting information from fitted model objects. From the help files it is not completely clear to me whether the number returned by nobs() should be the same as the "nobs" attribute of the object returned by logLik(). If so, then there is a slight inconsistency in the methods for 'nls' objects with
2012 Apr 24
1
nobs.glm
Hi all, The nobs method of (MASS:::polr class) takes into account of weight, but nobs method of glm does not. I wonder what is the rationale of such design behind nobs.glm. Thanks in advance. Best Regards. > library(MASS) > house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) > house.logit <- glm(I(Sat=='High') ~ Infl + Type + Cont, binomial,weights
2011 Apr 13
0
R 2.13.0 is released
I've rolled up R-2.13.0.tar.gz a short while ago. This is a development release which contains a number of new features. Also, a number of mostly minor bugs have been fixed (but notice that serious build issues were fixed in 2.12.2). See the full list of changes below. You can get it from http://cran.r-project.org/src/base/R-2/R-2.13.0.tar.gz or wait for it to be mirrored at a CRAN site
2011 Apr 13
0
R 2.13.0 is released
I've rolled up R-2.13.0.tar.gz a short while ago. This is a development release which contains a number of new features. Also, a number of mostly minor bugs have been fixed (but notice that serious build issues were fixed in 2.12.2). See the full list of changes below. You can get it from http://cran.r-project.org/src/base/R-2/R-2.13.0.tar.gz or wait for it to be mirrored at a CRAN site
2013 Feb 18
1
nobs() with glm(family="poisson")
Hi! The nobs() method for glm objects always returns the number of cases with non-null weights in the data, which does not correspond to the number of observations for Poisson regression/log-linear models, i.e. when family="poisson" or family="quasipoisson". This sounds dangerous since nobs() is, as the documentation states, primarily aimed at computing the Bayesian
2006 Mar 28
0
Why is AIC from lmer 2 less than that from lme?
I'm migrating to lmer() from lme(). I have noticed that AIC values from lmer() are 2 units smaller than those reported by lme(). Could someone please explain why? The issue can be replicated with the first example from Pinheiro & Bates (2000) Mixed-effects models in S and S-plus. library(nlme) Rail2 <- Rail summary(lme(travel~1,data=Rail2,random=~1|Rail)) # AIC = 128.177
2003 Nov 13
1
creating a "report" table from a set of lists
I've been trying to figure out how to accomplish the following... I've got a list (returned from a function) and I would like to "cbind()" the lists together to create a "cross tab" report or simply bind them together somehow the function returns a list that looks like the following: > all$BM $species [1] "BM" $vbar.nobs [1] 3 $vbar.sum [1] 54.05435
2013 Apr 25
1
lsfit: Error in formatting error message
Hi, in R-3.0 I get the following error when calling lsfit with more observations than variables, which seems to come from an error in the formatting of the error message (note that this was not happening in 2.15.3): > nobs <- 5; nvar <- 6; lsfit(matrix(runif(nobs*nvar), ncol=nvar), runif(nobs), intercept=FALSE) Error in sprintf(ngettext(nry, "%d response", "%d
2008 Dec 23
1
quotation problem/dataframe names as function input argument.
Dear R friends: Can someone help me with the following problem? Many thanks in advance. # Problem Description: # I want to write functions which take a (character) vector of dataframe names as input argument. # For example, I want to extract the number of observations from a number of dataframes. # I tried the following: nobs.fun <- function (dframe.vec) { nobs.vec <-