similar to: Behaviour of interactions in glm

Displaying 20 results from an estimated 300 matches similar to: "Behaviour of interactions in glm"

2009 Feb 27
1
testing two-factor anova effects using model comparison approach with lm() and anova()
I wonder if someone could explain the behavior of the anova() and lm() functions in the following situation: I have a standard 3x2 factorial design, factorA has 3 levels, factorB has 2 levels, they are fully crossed. I have a dependent variable DV. Of course I can do the following to get the usual anova table: > anova(lm(DV~factorA+factorB+factorA:factorB)) Analysis of Variance Table
2011 Jan 21
1
TRADUCING lmer() syntax into lme()
---------- Forwarded message ---------- From: Freddy Gamma <freddy.gamma@gmail.com> Date: 2011/1/21 Subject: TRADUCING lmer() syntax into lme() To: r-sig-mixed-models@r-project.org Dear Rsociety, I'd like to kingly ask to anyone is willing to answer me how to implement a NON NESTED random effects structure in lme() In particular I've tried the following translation from lmer to
2009 Apr 10
2
Problem with bargraph.CI in Sciplot package
Hi there, I wonder if anyone can help me. I'm trying to use bargraph.CI in the Sciplot package when there is a missing combination of the factor levels. Unfortunately the standard errors on the plot do not appear to be correct. Consider an analysis consisting of two factors A and B. When all factor level combinations are present all appears fine: library(sciplot) #all data
2008 Nov 04
1
How to generate a new factor variable by two other factor variables
How to generate a new factor variable by two other factor variables? For example, if I have two factor variables, factorA and factorB, factorA factorB 0 0 0 0 1 0 0 1 1 1 Is there a simple way to generate a new 4-levels factor variable as factorC factorA factorB 0 0 0 0 0 0 1 1 0 2 0 1
2008 Nov 30
2
Randomization of a two-way ANOVA?
Hello list, I wish to perform a randomization test on the F-statistics of a 2 way ANOVA but have not been able to find out how to do so - is there a package / function that can perform this that I am unaware of? FactorA has 6 levels (0,1,2,3,4,5) whereas FactorB has 3 (1,2,3). A sample: Resp. FactorA FactorB 2 0 2 3 1 2 1 2 2 0 3 2 0 4 2 0 5 2 4 0 1 6 1 1 1 2 1 0 3 1 1 4 1 0 5 1 2 0 2 3 1 2 1
2004 Aug 06
1
Lattice: how to index in a custom panel function?
Hi, I have a lattice xyplot that contains panels according to FactorA, and curves for the 2 levels of Factor B within a panel. I try to add text in the panels of a lattice graph. I suppose I have to write a custom function (panel.txt). What I really would like is to adapt the text in the panel according to the levels of FactorA. In the manuals, I find examples for the strips using which.given
2012 Nov 21
0
Two way manova
Hello everyone, I would like to perform a 2-way manova test, but I'm having some issues. I implemented like this Y<-cbind(Resp1,Resp2,Resp3,....,Respn) model<-manova(Y "tilda" FactorA*FactorB) summary.aov(model) 1. I don't know at what level I have to do the Type I error correction. Is it on p-values returned by "summary.aov(model)? Or is it when I compare each
2005 Dec 26
3
factorial anova
Hello every body, I am trying to do a factorial anova analysis following this model: model<-anova(lm(responsevariable~factorA*factorB)) model<-anova(lm(luz$dosel~luz$estado*luz$Bosque)) Df Sum Sq Mean Sq F value Pr(>F) estado 1 6931.1 6931.1 41.6455 7.974e-06 *** Bosque 1 36.6 36.6 0.2197 0.6456 estado:Bosque 1 36.6 36.6 0.2197 0.6456 Residuals
2010 Sep 15
0
A question on modelling binary response data using factors
Dear all, A question on modelling proportional data in R. I have a test experiment that was designed in a particular way, and which I can analyse "by hand" to an extent. I am really struggling to get R to give me sensible results in modelling it "properly", so must be doing something wrong here. As background, I conduct a series of experiments and count the
2012 Jun 19
1
Error when trying to update cpglm model
Dear all, I've been having problems running update() to re-fit a cpglm model inside a function (as in the code below). The solution is probably simple, but I'm stuck. If anyone could help, I'd greatly appreciate it. Regards, Rubem ## R code library(cplm) ## Data simulation period<-factor(1:4)                        herd<-factor(1:50)  
2005 Jul 25
5
passing formula arguments cv.glm
I am trying to write a wrapper for the last example in help(cv.glm) that deals with leave-one-out-cross-validation (LOOCV) for a logistic model. This wrapper will be used as part of a bigger program. Here is my wrapper funtion : logistic.LOOCV.err <- function( formu=NULL, data=NULL ){ cost.fn <- function(cl, pred) mean( abs(cl-pred) > 0.5 ) glmfit <- glm(
2007 Jan 26
0
R crash with modified lmer code
Hi all, I've now got a problem with some modified lmer code (function lmer1 pasted at end) - I've made only three changes to the lmer code (marked), and I'm not really looking for comments on this function, but would like to know why execution of the following commands that use it almost invariably (but not quite predictably) leads to the R session terminating. Here's the command
2010 Oct 06
2
ANOVA boxplots
Dear list, i have a quick and (hopefully) straightforward question regarding the plot-function after running aov. if i plot an equation like this: plot(dataSubjects~factorA, data=mydata) R gives me the boxplots for this particular factor A. my model, however contains several factors. is there a straightforward way to plot barplots for a specific factor with the constraint that those values
2006 Mar 14
1
R CMD check: problems possibly from mapply?
Dear expeRts, I am trying to wrap up a package "utilities" (for my internal use). After adding a function datNAtreat that uses mapply, R CMD check gives WARNINGs for "S3 generic/method consistency", "checking replacement functions" and?"checking foreign function calls", all of which are accompanied by the following error message: Error in .try_quietly
2007 Feb 23
1
Bootstrapping stepAIC() with glm.nb()
Dear all, I would like to Boostrap the stepAIC() procedure from package MASS for variety of model objects, i.e., fn <- function(object, data, B = 2){ n <- nrow(data) res <- vector(mode = "list", length = B) index <- sample(n, n * B, replace = TRUE) dim(index) <- c(n, B) for (i in 1:B) { up.obj <- update(object, data = data[index[, i], ])
2016 Oct 10
2
[arm, aarch64] Alignment checking in interleaved access pass
Hi Renato, Thank you for the answers! First, let me clarify a couple of things and give some context. The patch it looking at VSTn, rather than VLDn (stores seem to be somewhat harder to get the "right" patterns, the pass is doing a good job for loads already) The examples you gave come mostly from loop vectorization, which, as I understand it, was the reason for adding the
2013 Nov 21
0
Cost function in cv. glm for a fitted logistic model when cutoff value of the model is not 0.5
I have a logistic model fitted with the following R function: glmfit<-glm(formula, data, family=binomial) A reasonable cutoff value in order to get a good data classification (or confusion matrix) with the fitted model is 0.2 instead of the mostly used 0.5. And I want to use the `cv.glm` function with the fitted model: cv.glm(data, glmfit, cost, K) Since the response in the fitted
2005 Nov 08
1
Interpretation of output from glm
I am fitting a logistic model to binary data. The response variable is a factor (0 or 1) and all predictors are continuous variables. The main predictor is LT (I expect a logistic relation between LT and the probability of being mature) and the other are variables I expect to modify this relation. I want to test if all predictors contribute significantly for the fit or not I fit the full
2012 Apr 03
0
Off Topic: Re: Calculating NOEL using R and logistic regression - Toxicology
Below. -- Bert On Tue, Apr 3, 2012 at 1:47 PM, Danielle Duncan <dlduncan2 at alaska.edu> wrote: > Thanks for the response, I should have clarified that the NOEL is the > smallest dose above which there is a statistically significant effect. > This is not a scientifically meaningful nor defensible definition as it is stochastic, depends on the test used, design, level chosen, etc.
2009 Aug 26
3
tweedie and lmer
Hello all, I have count data with about 36% of observations being zeros. I found in some of the examples of the r-help mail archives that a tweedie family of distributions could be used to fit a model with random effects. Upon installing the tweedie package and attempting to fit the following model: lmer(SUS ~ 1 + (1|