similar to: A hiccup when using anova on gam() fits.

Displaying 20 results from an estimated 7000 matches similar to: "A hiccup when using anova on gam() fits."

2004 Dec 20
2
problems with limma
I try to send this message To Gordon Smyth at smyth at vehi,edu.au but it bounced back, so here it is to r-help I am trying to use limma, just downloaded it from CRAN. I use R 2.0.1 on Win XP see the following: > library(RODBC) > chan1 <- odbcConnectExcel("D:/Data/mgc/Chips/Chips4.xls") > dd <- sqlFetch(chan1,"Raw") # all data 12000 > # > nzw <-
2008 Jan 05
1
Likelihood ratio test for proportional odds logistic regression
Hi, I want to do a global likelihood ratio test for the proportional odds logistic regression model and am unsure how to go about it. I am using the polr() function in library(MASS). 1. Is the p-value from the likelihood ratio test obtained by anova(fit1,fit2), where fit1 is the polr model with only the intercept and fit2 is the full polr model (refer to example below)? So in the case of the
2005 Jun 15
1
anova.lme error
Hi, I am working with R version 2.1.0, and I seem to have run into what looks like a bug. I get the same error message when I run R on Windows as well as when I run it on Linux. When I call anova to do a LR test from inside a function, I get an error. The same call works outside of a function. It appears to not find the right environment when called from inside a function. I have provided
2012 Nov 08
2
Comparing nonlinear, non-nested models
Dear R users, Could somebody please help me to find a way of comparing nonlinear, non-nested models in R, where the number of parameters is not necessarily different? Here is a sample (growth rates, y, as a function of internal substrate concentration, x): x <- c(0.52, 1.21, 1.45, 1.64, 1.89, 2.14, 2.47, 3.20, 4.47, 5.31, 6.48) y <- c(0.00, 0.35, 0.41, 0.49, 0.58, 0.61, 0.71, 0.83, 0.98,
2018 Jan 17
1
Assessing calibration of Cox model with time-dependent coefficients
I am trying to find methods for testing and visualizing calibration to Cox models with time-depended coefficients. I have read this nice article <http://journals.sagepub.com/doi/10.1177/0962280213497434>. In this paper, we can fit three models: fit0 <- coxph(Surv(futime, status) ~ x1 + x2 + x3, data = data0) p <- log(predict(fit0, newdata = data1, type = "expected")) lp
2008 Apr 17
1
survreg() with frailty
Dear R-users, I have noticed small discrepencies in the reported estimate of the variance of the frailty by the print method for survreg() and the 'theta' component included in the object fit: # Examples in R-2.6.2 for Windows library(survival) # version 2.34-1 (2008-03-31) # discrepancy fit1 <- survreg(Surv(time, status) ~ rx + frailty(litter), rats) fit1 fit1$history[[1]]$theta
2011 Jan 05
1
Comparing fitting models
Dear all, I have 3 models (from simple to complex) and I want to compare them in order to see if they fit equally well or not. From the R prompt I am not able to see where I can get this information. Let´s do an example: fit1<- lm(response ~ stimulus + condition + stimulus:condition, data=scrd) #EQUIVALE A lm(response ~ stimulus*condition, data=scrd) fit2<- lm(response ~ stimulus +
2009 Apr 28
1
How to read the summary
How can I from the summary function, decide which glm (fit1, fit2 or fit3) fits to data best? I don't know what to look after, so I would please explain the important output. > fit1 <- glm(Y~X, family=gaussian(link="identity")) > fit2 <- glm(Y~X, family=gaussian(link="log")) > fit3 <- glm(Y~X, family=Gamma(link="log")) > summary(fit1) Call:
2011 Sep 12
1
coxreg vs coxph: time-dependent treatment
Dear List, After including cluster() option the coxreg (from eha package) produces results slightly different than that of coxph (from survival) in the following time-dependent treatment effect calculation (example is used just to make the point). Will appreciate any explaination / comment. cheers, Ehsan ############################ require(survival) require(eha) data(heart) # create weights
2009 Apr 24
2
prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging)
Hi all, I was wondering if there is a function out there, or someone has written code for making confidence intervals around model averaged predictions (y~á+âx). The model average estimates are from the dRedging library? It seems a common thing but I can't seem to find one via the search engines Examples of the models are: fit1 <- glm(y~ dbh, family = binomial, data = data) fit2 <-
2018 Jan 18
1
Time-dependent coefficients in a Cox model with categorical variants
First, as others have said please obey the mailing list rules and turn of First, as others have said please obey the mailing list rules and turn off html, not everyone uses an html email client. Here is your code, formatted and with line numbers added. I also fixed one error: "y" should be "status". 1. fit0 <- coxph(Surv(futime, status) ~ x1 + x2 + x3, data = data0) 2. p
2011 Jan 21
2
Looping with incremented object name and increment function
Folks, I am trying to get a loop to run which increments the object name as part of the loop. Here "fit1" "fit2" "fit3" and "fit4" are linear regression models that I have created. > for (ii in c(1:4)){ + SSE[ii]=rbind(anova(fit[ii])$"Sum Sq") + dfe[ii]=rbind(summary(fit[ii])$df) + } Error in anova(fit[ii]) : object 'fit' not found
2009 May 12
1
questions on rpart (tree changes when rearrange the order of covariates?!)
Greetings, I am using rpart for classification with "class" method. The test data is the Indian diabetes data from package mlbench. I fitted a classification tree firstly using the original data, and then exchanged the order of Body mass and Plasma glucose which are the strongest/important variables in the growing phase. The second tree is a little different from the first one. The
2005 Apr 08
1
anova with gam?
Hello. In SPLUS I am used to comparing nested models in gam using the anova function. When I tried this in R this doesn't work (the error message says that anova() doesn't recognise the gam fit). What must I do to use anova with gam? To be clear, I want to do the following: fFit1<-gam(y~x,.) fit1<-fam(y~s(x),.) anova(fit2,fit1,test="F") Thanks. Bill Shipley
2013 Apr 17
1
mgcv: how select significant predictor vars when using gam(...select=TRUE) using automatic optimization
I have 11 possible predictor variables and use them to model quite a few target variables. In search for a consistent manner and possibly non-manual manner to identify the significant predictor vars out of the eleven I thought the option "select=T" might do. Example: (here only 4 pedictors) first is vanilla with "select=F" >
2009 May 22
1
bug in rpart?
Greetings, I checked the Indian diabetes data again and get one tree for the data with reordered columns and another tree for the original data. I compared these two trees, the split points for these two trees are exactly the same but the fitted classes are not the same for some cases. And the misclassification errors are different too. I know how CART deal with ties --- even we are using the
2008 May 09
2
how to check linearity in Cox regression
Hi, I am just wondering if there is a test available for testing if a linear fit of an independent variable in a Cox regression is enough? Thanks for any suggestions. John Zhang ____________________________________________________________________________________ [[elided Yahoo spam]]
2010 Jun 07
1
fit data with y = x^-1
Dear list, I am getting weired with fitting data with a 1/x-polynomial. Suggest I have the following data: x <- c(1,2,3,4,5,6,7) y <- c(100,20,4,2,1,.3,.1) I may fit this with a linear model fit1 = lm(y ~ I(x)) Getting plot out of this model I applied library(polynom) pol1 = polynomial(fit1$coefficients) f1 = as.function(pol1) plot(x,y) lines(x, f1(x), col = 2) Clearly, this model
2005 May 25
3
Problem with systemfit 0.7-3 and transformed variables
The 'systemfit' function in systemfit 0.7-3 CRAN package seems to have a problem with formulas that contain transformed (eg. log) variables. If I have my data in a data frame, apparently systemfit doesn't "pass" the information of where the variables should be taken to the transforming function. I'm not entirely sure if this is a bug or just a limitation, I was just
2010 Jan 19
1
A model-building strategy in mixed-effects modelling
Dear all, Consider a completely randomized block design (let's use data(Oats) irrespoctive of the split-plot design it was arranged in). Look: library(nlme) fit <- lme(yield ~ nitro, Oats, random = ~1|Block, method="ML") fit2 <- lm(yield ~ nitro + Block, Oats) anova(fit, fit2) gives this: Model df AIC BIC logLik Test L.Ratio p-value fit 1 4 624.3245