similar to: Two-way linear model with interaction but without one main effect

Displaying 20 results from an estimated 2000 matches similar to: "Two-way linear model with interaction but without one main effect"

2013 Jul 15
2
suppress startup messages from default packages
Hi all, several packages print messages during loading. How do I avoid to see them when the packages are in the defaultPackages? Here is an example. With this in ~/.Rprofile ,----[ ~/.Rprofile ] | old <- getOption("defaultPackages") | options(defaultPackages = c(old, "filehash")) | rm(old) `---- I get as last line when starting R: ,---- | filehash: Simple key-value
2012 Mar 12
1
Faceted bar plot shows wrong counts (ggplot2)
I have encountered a problem with faceted bar plots. I have tried to create something like the example explained in the ggplot2 book (see pp. 126-128): library(ggplot2) mpg4 <- subset(mpg, manufacturer %in% c("audi", "volkswagen", "jeep")) mpg4$manufacturer <- as.character(mpg4$manufacturer) mpg4$model <- as.character(mpg4$model) base <-
2012 May 17
2
MANOVA with random factor
Dear All I would need to perform a MANOVA with both fixed (group, sex, group*sex) and random (brood) effects. I wonder if this is at all possible and if R does that. At the moment, I only know that I can run a classic MANOVA with R. Thank you David ______________________________________________ David Costantini, PhD http://www.davidcostantini.it NERC Postdoctoral research associate
2012 Mar 27
1
read.octave fails with data from Octave > 3.2.X
Hi, I'm afraid that the function read.octave from package "foreign" has some problems with the ASCII data format exported by new versions of Octave (later than 3.2.X). It fails even for a simple case as: [Octave code:] octave:1> x=1; octave:2> save -ascii testdata.mat x [Now in R:] > octavedata <- read.octave('testdata.mat') Mensajes de aviso perdidos In
2011 Sep 29
1
F and Wald chi-square tests in mixed-effects models
I have a doubt about the calculation of tests for fixed effects in mixed-effects models. I have read that, except in well-balanced designs, the F statistic that is usually calculated for ANOVA tables may be far from being distributed as an exact F distribution, and that's the reason why the anova method on "mer" objects (calculated by lmer) do not calculate the denominator df nor a
2012 Jun 12
4
replacing NA for zero
Dear R users, I have a very basic query, but was unable to find a proper anwser. I have the following data.frame x y 2 0.12 3 0.25 4 0.11 6 0.16 7 0.20 and, due to further calculations, I need the data to be stored as x y 1 0 2 0.12 3 0.25 4 0.11 5 0 6 0.16 7 0.20 8 0 How do
2012 May 19
3
anovas ss typeI vs typeIII
Hi all, I have been struggling with ANOVAs on R. I am new to R, so I created a simple data frame, and I do some analyses on R just to learn R and then check them on SPSS to make sure that I am doing fine. Here is the problem that I've run into: when we use the aov function, it uses SS Type I as default (on SPSS it is Type III). Then I used the Anova function under cars package using the
2013 Jan 08
1
GLMM post- hoc comparisons
Hi All, I have data about seed predation (SP) in fruits of three differents colors (yellow, motted, dark) and in two fruiting seasons (2007, 2008). I performed a GLMM (lmer function, lme4 package) and the outcome showed that the interaction term (color:season) was significant, and some combinations of this interaction have significant Pr(>|z|), but I don't think they are the right
2011 Oct 26
2
Error in summary.mlm: formula not subsettable
When I fit a multivariate linear model, and the formula is defined outside the call to lm(), the method summary.mlm() fails. This works well: > y <- matrix(rnorm(20),nrow=10) > x <- matrix(rnorm(10)) > mod1 <- lm(y~x) > summary(mod1) ... But this does not: > f <- y~x > mod2 <- lm(f) > summary(mod2) Error en object$call$formula[[2L]] <- object$terms[[2L]]
2013 Jul 25
2
ask help!
Hi, In the R console, I have the following: > runif(10) Error in runif(10) : '.Random.seed' is not an integer vector but of type 'list' > Can someone advise me of the solution of the problem? Mei-Yuan Chen Department of Finance NCHU, aiwan
2012 Mar 05
2
new to repeated measures anova in R
Data set up as one observation/subject looks like (with a total of 10 subjects) Two treatments: shoe type with 3 categories and region with 8 categories ==> 24 "treatment" columns Subject PHallux PMidToes PLatToe PMTH1 PMidMTH PLatMTH PMidfoot PRearfoot LHallux LMidToes LLatToe LMTH1 LMidMTH LLatMTH LMidfoot LRearfoot DHallux DMidToes DLatToe DMTH1 DMidMTH DLatMTH
2006 Jul 11
3
least square fit with non-negativity constraints for absorption spectra fitting
I would really appreciate it if someone can give suggestions on how to do spectra fitting in R using ordinary least square fitting and non-negativity constraints. The lm() function works well for ordinary least square fitting, but how to specify non-negativity constraints? It wouldn't make sense if the fitting coefficients coming out as negative in absorption spectra deconvolution. Thanks.
2012 Feb 22
6
Loop
Dear all, I have a (probably very basic) question. I am imputing data with the mice package, using 10 chains. I can then write out the 10 final values of the chains simply by name1 <- complete(imp, 1) : : name10 <- complete(imp,10) Not a big deal, I just wanted to do that in a little loop as follows: for (i in 1:10){ set[i] <-
2015 Feb 16
0
Release of phia 0.2-0
Dear R users, I want to announce an update of the package "phia", version 0.2-0, now on CRAN: <http://cran.r-project.org/web/packages/phia/> "phia" (Post-Hoc Interaction Analysis) is aimed at the analysis of the expected values and other terms of in linear, generalized, and mixed linear models, on the basis of multiple comparisons of factor contrasts, and is specially
2015 Feb 16
0
Release of phia 0.2-0
Dear R users, I want to announce an update of the package "phia", version 0.2-0, now on CRAN: <http://cran.r-project.org/web/packages/phia/> "phia" (Post-Hoc Interaction Analysis) is aimed at the analysis of the expected values and other terms of in linear, generalized, and mixed linear models, on the basis of multiple comparisons of factor contrasts, and is specially
2016 Apr 16
2
faster way to use filter this
I have the following (simplified) vectors: index <- c("shoe" "shirt" "fruit") cost <- c(100, 50, 2) data <- c("shirt", "shoe", "vegetable") I want my outcome to be: (50, 100, 0) (shirt => 50, shoe => 100, vegetable => not found, so 0) I have written the following function: for (i in custom_list) { + this_cost
2012 Mar 12
2
How to create interrupted boxplot
Hello, I have created two boxplots with following R code. There is one outlier in B group. The outlier is 33. But the all other data are between 0 to 4. How can I skip y-axis around 5 to 25, and expand 0-4 for this case. Also I want keep the outlier in my boxplot. I want my boxplot look like the second one, keep the outlier, and make an interrupt of y-axis from 5 to 25. Thanks, Jianghong
2012 Mar 15
2
Ggplot barchart drops factor levels: how to show them with zero counts?
Hello, When plotting a barchart with ggplot it drops the levels of the factor for which no counts are available. For example: library(ggplot) mtcars$cyl<-factor(mtcars$cyl) ggplot(mtcars[!mtcars$cyl==4,], aes(cyl))+geom_bar() levels(mtcars[!mtcars$cyl==4,]) This shows my problem. Because no counts are available for factorlevel '4', the label 4 dissapears from the plot. However, I
2007 Mar 20
2
Any R function for self-controlled case series method /effect absorption?
Hello, Has anyone written R functions for applying self-controlled case series methods (http://statistics.open.ac.uk/sccs/). In fact only thing needed is to modify glm function to allow absorption of effect. Eg. in Poisson model individual effect is used as factor, but it is considered as nuisance term where parameter estimates are not needed. Could anyone point how absorbing individual
2011 Sep 22
1
Wrapper of linearHypothesis (car) for post-hoc of repeated measures ANOVA
For some time I have been looking for a convenient way of performing post-hoc analysis to Repeated Measures ANOVA, that would be acceptable if sphericity is violated (i.e. leaving aside post-hoc to lme models). The best solution I found was John Fox's proposal to similar requests in R-help: http://tolstoy.newcastle.edu.au/R/e2/help/07/09/26518.html