Displaying 3 results from an estimated 3 matches for "predictor3".
Did you mean:
predictor
2013 Jul 20
2
Different x-axis scales using c() in latticeExtra
...les for the different panels?
Here is an example:
library(lattice)
library(latticeExtra)
response <- c(76, 14, 15, 44, 26, 19, 74, 123, 49, 8, 56, 17, 18)
predictor1 <- c(107, 7, 25, 501, 64, 88, 344, 367, 379, 10, 66, 31, 32)
predictor2 <- c(10, 9, 8, 10, 29, 27, 55, 48, 2, 6, 14, 10, 5)
predictor3 <- c(67, 22, 66, 41, 72, 64, 69, 63, 64, 70, 60, 75, 78)
pred1_plot <- xyplot(response ~ predictor1, scales = list(log = TRUE,
equispaced.log = FALSE),
panel = function(x, y, ...) {
panel.xyplot(x, y, type = c("p", "r"), cex = 2)
panel.text(x = log10(8), y = log...
2009 Jul 15
0
strategy to iterate over repeated measures/longitudinal data
Hi Group,
Create some example data.
set.seed(1)
wide_data <- data.frame(
id=c(1:10),
predictor1 = sample(c("a","b"),10,replace=TRUE),
predictor2 = sample(c("a","b"),10,replace=TRUE),
predictor3 = sample(c("a","b"),10,replace=TRUE),
measurement1=rnorm(10),
measurement2=rnorm(10))
head(wide_data)
id predictor1 predictor2 predictor3 measurement1 measurement2
1 1 a a b -0.04493361 -0.05612874
2 2 a a a...
2017 Aug 15
1
ANOVA test to decide whether to use multiple linear regression or linear mixed effects model
R-help:
I am trying to decide between using a multiple linear regression or a linear mixed effects model for my data:
model1 <- lm (responsevariable ~ predictor1 + predictor2 + predictor3 + predictor4, data= data)
model2 <- lme (responsevariable ~ predictor1 + predictor2 + predictor3 + predictor4, random = ~1 | site, data= data)
anova (model1, model2)
but I keep getting the following error code:
Error in anova.lmlist (object, ...):
models were not all fitted to the sam...