Displaying 4 results from an estimated 4 matches for "logarea".
2005 Jul 19
2
Regression lines for differently-sized groups on the same plot
...ve so that I get a solid line rather than small dots and dashes where
actual data exist. Thanks so much for your help!
Laura Marx
Michigan State University, Dept. of Forestry
#Note: hemdata has all the rows that are not hemlock species replaced with
#"NA"s.
hemhem=glm(hempresence~logarea, family=binomial(logit), data=hemdata)
hemyb=glm(hempresence~logarea, family=binomial(logit), data=birchdata)
hemsm=glm(hempresence~logarea, family=binomial(logit), data=mapledata)
attach(logreg) #logreg is the full dataset
plot(logarea, hempresence, xlab = "Surface area of log (m2)",...
2009 Jun 04
3
Plot and lm
...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 , Raphus cucullatus, herb, 19
Maur...
2009 Dec 07
2
How to apply five lines of code to ten dataframes?
Hello R-helpers,
I have 10 dataframes (named data1, data2, ... data10) and I would like to
add 5 new columns to each dataframe using the following code:
data1$LogDepth<-log10(data1[,2]/data1[,4])
data1$LogArea<-log10(data1[,3]/data1[,5])
data1$p<-2*data1[,6]/data1[,7]
data1$Exp<-data1[,2]^(2/data1[,8])
data1$s<-data1[,3]/data1[,9]
...but I would prefer not to repeat this chunk of code 10 times!
I have struggled with setting up a loop to apply these 5 lines of code to
each of the 10 datafram...
2011 Jun 22
1
lme convergence failure within a loop
...all with the same
structure, across a spatial grid with data points collected at various
time points within each grid cell. I'm trying to use a 'for' loop to try
the model fit on each grid cell. In some cells lme does not converge,
giving me the error:
Error message: In lme.formula(logarea ~ year + summ_d, data = grid2,
random = ~year + :
nlminb problem, convergence error code = 1
message = iteration limit reached without convergence (9)
When I get the error, the program aborts, and my loop stops.
I'm not too worried about the error, as a generic mixed model structure...