Displaying 1 result from an estimated 1 matches for "lgvar".
Did you mean:
gvar
2010 Apr 01
2
Adding regression lines to each factor on a plot when using ANCOVA
...39.7,41.2,84.8,79.2,78.3,82.8,102.8,107.2,104.1,51.7,45.5,50.6,27.5,26.6,27.5,26.9,25.4,23.7,21.7,22.2,23.8,46.9,51.5,49.4,33.4,33.1,33.2,34.7,39.3,41.7,40.5,42.7,41.8)
dataset <- cbind(groups, beak.lgth, mass)
# ANCOVA function
anc <- function(variable, covariate, group){
# transform data
lgVar <- log10(variable)
lgCov <- log10(covariate)
# separate regression lines for each group
model1 <- lm(lgVar ~ lgCov + group + lgCov:group)
model1.summ <- summary(model1)
model1.anv <- anova(model1)
# separate regression lines for each group, but with the same slope
model2 &...