search for: logmass

Displaying 2 results from an estimated 2 matches for "logmass".

2009 Jun 04
3
Plot and lm
I want to make a log-log plot with a regression line, but I can't figure out what I'm doing wrong. What I'm trying is: plot(mass,area, log="xy", pch=as.numeric(food)) abline(lm(mass~area)) or plot(mass,area, log="xy", pch=as.numeric(food)) islands$logmass <- log(mass) islands$logarea <- log(area) attach(islands) abline(lm(logmass~logarea)) But that does not show a line. Where am I going wrong? data: island, area,species,food,mass Ibiza , 577 , Anser n. sp., herb, 2.0 Ibiza , 577 , Haliaeetus albicilla, carn, 4.8 Mauritius , 1874 , Ra...
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