search for: edf

Displaying 20 results from an estimated 196 matches for "edf".

Did you mean: edd
2011 Aug 17
3
How to apply a function to subsets of a data frame *and* obtain a data frame again?
...t, let's create some data to play around: set.seed(1) (df <- data.frame(Group=rep(c("Group1","Group2","Group3"), each=10), Value=c(rexp(10, 1), rexp(10, 4), rexp(10, 10)))[sample(1:30,30),]) ## Now we need the empirical distribution function: edf <- function(x) ecdf(x)(x) # empirical distribution function evaluated at x ## The big question is how one can apply the empirical distribution function to ## each subset of df determined by "Group", so how to apply it to Group1, then ## to Group2, and finally to Group3. You might sug...
2009 May 05
0
stepAICc function (based on MASS:::stepAIC.default)
...keep.list <- vector("list", steps) if (is.list(object) && (nmm <- match("nobs", names(object), 0)) > 0) n <- object[[nmm]] else n <- length(residuals(object)) fit <- object bAIC<- extractAIC(fit, scale, k = k, ...) edf <- bAIC[1L] #extracts the number of parameters, k=edf bAIC <- bAIC[2L]+((2*edf*(edf+1))/(n-edf-1)) if (is.na(bAIC)) stop("AICc is not defined for this model, so stepAIC cannot proceed") nm <- 1 Terms <- terms(fit) if (trace) { cat("St...
2006 Jul 04
2
[Xen-tools] What''s the main difference between BVT and EDF?,
Hi folks BVT and EDF are both xen scheduler. It is expected that administrator will choose the scheduler most appropriate to their application and configure the machine to boot with that scheduler. I just wonder What''s the main difference between BVT and EDF? What kind of scenario to use them? Thanks ______...
2010 Aug 31
1
anova and lm results differ
Dear all I have found that the two "equivalent" commands do not produce the same results. 1. (I wrote this command by hand, this is what I would do usually) >summary(aov(eduyrs ~ cntry * edf, data=ESS1)) Df Sum Sq Mean Sq F value Pr(>F) cntry 1 257 256.65 21.2251 4.243e-06 *** edf 4 11010 2752.42 227.6296 < 2.2e-16 *** cntry:edf 4 24 6.03 0.4987 0.7367 Residuals 3205 38754 12.09...
2017 Jun 08
1
stepAIC() that can use new extractAIC() function implementing AICc
...ot;identity")) extractAIC(G1) stepAIC(G1) extractAIC.glm <- function(fit, scale, k = 2, criteria = c("AIC", "AICc", "BIC"), ...) { criteria <- match.arg(arg=criteria, choice=c("AIC", "AICc", "BIC")) AIC <- fit$aic edf <- length(fit$coefficients) n <- nobs(fit, use.fallback = TRUE) if (criteria == "AICc") return(c(edf, AIC + (2*edf*(edf+1))/(n - edf -1))) if (criteria == "AIC") return(c(edf, AIC-2*edf + k*edf)) if (criteria == "BIC") return(c(edf, AIC -2*edf + lo...
2011 Mar 31
2
ANCOVA for linear regressions without intercept
Hello R experts I have two linear regressions for sexes (Male, Female, Unknown). All have a good correlation between body length (response variable) and head length (explanatory variable). I know it is not recommended, but for a good practical reason (the purpose of study is to find a single conversion factor from head length to body length), the regressions need to go through the origin (0
2008 Nov 28
2
AIC function and Step function
...nction" and "AIC () function". They are different. Then I just type "step" in the R console, and found the "AIC" used in "step() function" is "extractAIC". I went to the R help, and found: "The criterion used is AIC = - 2*log L + k * edf, where L is the likelihood and edf the equivalent degrees of freedom (i.e., the number of free parameters for usual parametric models) of fit. For linear models with unknown scale (i.e., for lm and aov), -2log L is computed from the deviance and uses a different additive constant to logLik and hen...
2008 Jul 08
1
shading an area in a edf
Hi, I've got the following edf: *** x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F2.5 <- ecdf(x) plot(F2.5, verticals= TRUE, do.p = TRUE, lwd=3, ylab = "", xlab = "", xlim = c(1,5.5)) abline(h= (0:5)*0.2) #mean abline(v=mean(x), lwd=2) mtext(text=expression(bar(x) == 3.07)...
2012 Jul 17
0
edf's higher than 1
Simon, in your recent reply to me, you noted that EDF=1 corresponds to a straight line fit. Does the edf always indicate the polynomial exponent directly? We ask because Hothorn and Everitt said "Roughly, the complexity of a cubic spline is about the same as a polynomial of degree one less than the degrees of freedom." Sorry we attribute...
2010 Jul 21
0
smbcontrol -d 3 smbd reload-config permission denied message.
...nd this was also the unix userid that I used to run the smbcontrol command so it has full unix authority. Smb.conf looks like this:- [global] workgroup = customer server string = csm1 SAMBA server interfaces = csm1 security = ADS realm = customer.edfenergy.net disable netbios = yes log file = /opt/pware64/var/sambalog log level = 1 max log size = 40960 name resolve order = host username map = /opt/pware64/lib/users.map create mask = 00 e.t.c...... Cheers, Steve North...
2003 Apr 11
0
fisrt (?) EDF scheduling discipline implementation.
Hi! I''m currently working on Earliest Deadline First qdisc implementation for providing delay bounded real-time services according IntServ architecture under Linux. My first step was simple EDF implementation, that is available from http://www.avalon.ru/~dketov/. If someone interesting in using EDF or just trying and testing it, please go ahead :) Any questions are welcome. Dimitry. _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman...
2012 Jun 02
2
mgcv (bam) very large standard error difference between versions 1.7-11 and 1.7-17, bug?
...low to enable a comparison. In addition, applying the default method="fREML" (mgcv version 1.7-17) on the same dataset yields only non-significant results, while all results are highly significant using method="REML". Furthermore, it also results in large negative (e.g., -8757) edf values linked to s(X,bs="RE") terms. Is this correct, or is this a bug? The summary of the model using method="fREML" is also shown below. I hope someone can shed some light on this. With kind regards, Martijn Wieling, University of Groningen #################################...
2010 Jun 16
3
mgcv, testing gamm vs lme, which degrees of freedom?
...me the function LogLik() seems to provide strange results regarding the number of degrees of freedom (df) for the gam, for instance in the example I copied below the df for the "gamm" are equal to the ones for the "lme", but the summary(model.gam) seems to indicate a much higher edf for the gamm. I would be very grateful to anybody who could point out a solution, Best wishes, Carlo Example below: ---- rm(list = ls()) library(mgcv) library(nlme) set.seed(123) x <- runif(100,1,10) # regressor b0 <- rep(rnorm(10,mean=1,sd=2),each=10) # random intercept id <-...
2009 Apr 30
1
stepAICc
Dear R users, Would it be difficult to change the code of stepAIC (from the MASS library) to use AICc instead of AIC? It would be great to know of someone has tried this already. Best wishes Christoph.
2002 Sep 10
2
Hat values for generalized additive models
...ciated. Regards, Mark Clements. (Apologies in advance for formatting etc. This is my first posting.) diff -ur c:/usr/temp/work/mgcv/R/mgcv.r ./R/mgcv.r --- c:/usr/temp/work/mgcv/R/mgcv.r 2002-05-17 03:04:26.000000000 +1000 +++ ./R/mgcv.r 2002-09-10 14:22:06.000000000 +1000 @@ -437,6 +437,7 @@ edf<-array(0,m) # estimated degrees of freedom ddiag<-array(0,3*m) # array for diagonostics idiag<-array(0,3) # array for diagnostics + hat<-array(0,n) # array for diagnostics Vp[1,1]<-1.0 M$gcv.ubre<-1.0; direct.mesh<-100 # number of points f...
2012 Jul 14
1
GAM Chi-Square Difference Test
...: gama1.3 <- gam(y~s(x, bs="cr")+z+int, family=quasipoisson) ##smooth the trend Model 4: gama1.4 <- gam(y~s(x, bs="cr")+z+s(int, bs="cr"), family=quasipoisson) ##smooth trend and interaction We have three questions. One question is simple. We occasionally obtain edf =1 and Ref.df=1 for some smoothed predictors (x, int). Because Wood says that edf can be interpreted roughly as functional form (quadratic, cubic etc) + 1, this would imply x^0 functional form for the predictor, and that doesn't make a lot of sense. Does such a result for edf and rdf indicate a...
2012 May 29
1
GAM interactions, by example
...ains that both b and b1 fits are similar: "note that the preceding fit (here b) is the same as (b1)...." I agree with the idea that it "looks" the same but when I look at the results from both models (summary b and summary b1) I see that the results look in fact quite different (edf, and also deviance explained for example???) Are those two models (b and b1) really testing the same things??? If yes, why are the results so different between models??? Thanks a lot if anyone can help with that... Geraldine dat <- gamSim(4) ## fit model... b <- gam(y ~ fac+s(x2,by=fac)+s(...
2006 Jun 05
2
Calculation of AIC BIC from mle
...the following: ml1 <- mle(...) AIC(ml1) I get the following error messale: Error in logLik(object) : no applicable method for "logLik" Therefore I am using the following to calculate the AIC: #AICmle calculate AIC from mle object AICmle <- function( m, k=2) { lL <- logLik(m) edf <- attr(lL, "df") LL <- lL[1] - 2 * LL + k * edf } 1) Why is AIC not working with objects of class mle - am I doing something wrong, is it a bug or by design? 2) Just for confirmation - is my calculation of AIC correct? Thanks Rainer
2007 Jun 21
1
mgcv: lowest estimated degrees of freedom
...hese are basic questions. I am fitting some GAM models using the mgcv package and following the model selection criteria proposed by Wood and Augustin (2002, Ecol. Model. 157, p. 157-177). One criterion to decide if a term should be dropped from a model is if the estimated degrees of freedom (EDF) for the term are close to their lower limit. What would be the minimum number of EDF's for a) Univariate thin plate regression splines(TPRS) with shrinkage, i.e. s(...,bs="ts") b) Bivariate tensor products of TPRS with shrinkage? Thanks for any help, Julian Burgos -- Julian M...
2011 Feb 23
1
request for patch in "drop1" (add.R)
...ault methods anyway), it becomes possible to make drop1() work with mer objects (Doug Bates's new mixed model code) merely by defining: terms.mer <- function(x, ...) { attr(x at frame,"terms") } extractAIC.default <- function(fit, scale=0, k=2, ...) { L <- logLik(fit) edf <- attr(L,"df") c(edf,-2*L+2*edf) } Adding this definition of extractAIC.default also makes drop1() work with lme fits ... Comments? Should I submit to the bug database as "enhancement request"? Are there any hidden downsides to this? Ben Bolker -------------- nex...