similar to: Selecting Best Model in an anova.

Displaying 20 results from an estimated 2000 matches similar to: "Selecting Best Model in an anova."

2009 Aug 28
4
Objects in Views
Hi everyone, I have recently experienced a strange behavior (strange from my knowledge) in rails. In my controllers ''new'' action, I am creating a few instance variables in the following manner : @controllerModel = ControllerModel.new @model1 = Model1.all @model2 = Model2.all in my ''new'' view, I am using the @controllerModel to create the form for new and I
2010 Apr 01
2
Adding regression lines to each factor on a plot when using ANCOVA
Dear R users, i'm using a custom function to fit ancova models to a dataset. The data are divided into 12 groups, with one dependent variable and one covariate. When plotting the data, i'd like to add separate regression lines for each group (so, 12 lines, each with their respective individual slopes). My 'model1' uses the group*covariate interaction term, and so the coefficients
2012 Jun 19
1
Possible bug when using encomptest
Hello R-Help, ----------------------------------------------------------------------------------------------------------------------------------------- Issues (there are 2): 1) Possible bug when using lmtest::encomptest() with a linear model created using nlme::lmList() 2) Possible modification to lmtest::encomptest() to fix confusing fail when models provided are, in fact, nested. I have
2001 Sep 08
1
t.test (PR#1086)
Full_Name: Menelaos Stavrinides Version: 1.3. 1 OS: Windows 98 Submission from: (NULL) (193.129.76.90) When model simplification is used in glm (binomial errors) and anova is used two compare two competitive models one can use either an "F" or a "Chi" test. R always performs an F test (Although when test="Chi" the test is labeled as Chi, there isn't any
2007 Jan 03
1
problem with logLik and offsets
Hi, I'm trying to compare models, one of which has all parameters fixed using offsets. The log-likelihoods seem reasonble in all cases except the model in which there are no free parameters (model3 in the toy example below). Any help would be appreciated. Cheers, Jarrod x<-rnorm(100) y<-rnorm(100, 1+x) model1<-lm(y~x) logLik(model1) sum(dnorm(y, predict(model1),
2012 Mar 20
2
anova.lm F test confusion
I am using anova.lm to compare 3 linear models. Model 1 has 1 variable, model 2 has 2 variables and model 3 has 3 variables. All models are fitted to the same data set. anova.lm(model1,model2) gives me: Res.Df RSS Df Sum of Sq F Pr(>F) 1 135 245.38 2 134 184.36 1 61.022 44.354 6.467e-10 *** anova.lm(model1,model2,model3) gives
2006 Oct 08
1
Simulate p-value in lme4
Dear r-helpers, Spencer Graves and Manual Morales proposed the following methods to simulate p-values in lme4: ************preliminary************ require(lme4) require(MASS) summary(glm(y ~ lbase*trt + lage + V4, family = poisson, data = epil), cor = FALSE) epil2 <- epil[epil$period == 1, ] epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"]
2011 Sep 15
1
p-value for non linear model
Hello, I want to understand how to tell if a model is significant. For example I have vectX1 and vectY1. I seek first what model is best suited for my vectors and then I want to know if my result is significant. I'am doing like this: model1 <- lm(vectY1 ~ vectX1, data= d), model2 <- nls(vectY1 ~ a*(1-exp(-vectX1/b)) + c, data= d, start = list(a=1, b=3, c=0)) aic1 <- AIC(model1)
2011 Sep 05
1
Power analysis in hierarchical models
Dear All I am attempting some power analyses, based on simulated data. My experimental set up is thus: Bleach: main effect, three levels (control, med, high), Fixed. Temp: main effect, two levels (cold, hot), Fixed. Main effect interactions, six levels (fixed) For each main-effect combination I have three replicates. Within each replicate I can take varying numbers of measurements (response
2004 Oct 11
3
logistic regression
Hello, I have a problem concerning logistic regressions. When I add a quadratic term to my linear model, I cannot draw the line through my scatterplot anymore, which is no problem without the quadratic term. In this example my binary response variable is "incidence", the explanatory variable is "sun": > model0<-glm(incidence~1,binomial) >
2010 Feb 14
1
how to delete a parameter from list after running negative binomial error
Hello everyone, Sorry if my question is not clear, my first language is not English, but Portuguese. I am building a model for my data, using non-binomial error. I am having a bit of a problem when updating the model to remove parameters that I no do no autocorrelate with other variables (I have used a autocorrelation function for this). So my first model looks like this:
2011 Sep 23
2
converting object elements to variable names and making subsequent assignments thereto
This has got to be incredibly simple but I nevertheless can't figure it out as I am apparently brain dead. I just want to convert the elements of a character vector to variable names, so as to then assign formulas to them, e.g: z = c("model1","model2"); I want to assign formulas, such as lm(y~x[,1]) and lm(y~x[,2]), to the variables "model1" and
2012 Aug 22
2
AIC for GAM models
Dear all, I am analysing growth data - response variable - using GAM and GAMM models, and 4 covariates: mean size, mean capture year, growth interval, having tumors vs. not The models work fine, and fit the data well, however when I try to compare models using AIC I cannot get an AIC value. This is the code for the gam model:
2013 Oct 14
1
Extracting elements of model output
I am having difficulty extracting specific results from the model object. The following code shows where I am stuck. I want to run resamplings of a data set. For each I want to extract a particular F for the contrasts. If I run a very simple model (e.g. model1 <- aov(time~group) ) I can get the relevant coefficients, for example, by using "model1$coefficients". That's fine.
2012 Sep 14
2
when to use "I", "as is" caret
Dear community, I've check it while working, but just to reassure myself. Let's say we have 2 models: model1 <- lm(vdep ~ log(v1) + v2 + v3 + I(v4^2) , data = mydata) model2 <- lm(vdep ~ log(v1) + v2 + v3 + v4^2, data = mydata) So in model1 you really square v4; and in model2, v4*^2 *doesn't do anything, does it? Model2 could be rewritten: model2b <- lm(vdep ~
2005 Jul 15
1
nlme and spatially correlated errors
Dear R users, I am using lme and nlme to account for spatially correlated errors as random effects. My basic question is about being able to correct F, p, R2 and parameters of models that do not take into account the nature of such errors using gls, glm or nlm and replace them for new F, p, R2 and parameters using lme and nlme as random effects. I am studying distribution patterns of 50 tree
2011 Sep 08
1
predict.rma (metafor package)
Hi (R 2.13.1, OSX 10.6.8) I am trying to use predict.rma with continuous and categorical variables. The argument newmods in predict.rma seems to handle coviariates, but appears to falter on factors. While I realise that the coefficients for factors provide the answers, the goal is to eventually use predict.rma with ANCOVA type model with an interaction. Here is a self contained example
2004 Oct 26
3
GLM model vs. GAM model
I have a question about how to compare a GLM with a GAM model using anova function. A GLM is performed for example: model1 <-glm(formula = exitus ~ age+gender+diabetes, family = "binomial", na.action = na.exclude) A second nested model could be: model2 <-glm(formula = exitus ~ age+gender, family = "binomial", na.action = na.exclude) To compare these two GLM
2011 Apr 14
1
mixed model random interaction term log likelihood ratio test
Hello, I am using the following model model1=lmer(PairFrequency~MatingPair+(1|DrugPair)+(1|DrugPair:MatingPair), data=MateChoice, REML=F) 1. After reading around through the R help, I have learned that the above code is the right way to analyze a mixed model with the MatingPair as the fixed effect, DrugPair as the random effect and the interaction between these two as the random effect as well.
2007 Jun 01
2
Interaction term in lmer
Dear R users, I'm pretty new on using lmer package. My response is binary and I have fixed treatment effect (2 treatments) and random center effect (7 centers). I want to test the effect of treatment by fitting 2 models: Model 1: center effect (random) only Model 2: trt (fixed) + center (random) + trt*center interaction. Then, I want to compare these 2 models with Likelihood Ratio Test.