Displaying 3 results from an estimated 3 matches for "m123".
Did you mean:
123
2005 Aug 23
2
merge list entries
...all("merge", list(myl[[1]], myl[[-1]], by="id", all=TRUE))
Error in do.call("merge", list(myl[[1]], myl[[-1]], by = "id", all = TRUE)) :
attempt to select more than one element
i can do the merge sequentially, e.g.
m12 <- merge(myl[[1]], myl[[2]], ...)
m123 <- merge(m12, myl[[3]], ...)
but (a) in my actual example i have up to q7, and (b) this looks very
clumsy, even if i wrapped it inside a do loop.
i'd appreciate any help.
alejandro
2010 May 11
1
nls() and nls2() behavior?
...y=y, x=x, dummy=dummy );
print(lm( y ~ as.factor(dummy) + x, data=d )) ## a simple fixed-effects model
objective.xs <- function( b, m1, m2, m3, x, ydebug ) {
tgts.mean= c(rep( m1, 7), rep( m2, 3), rep( m3, 5));
yhat= tgts.mean + b*x
#debug
cat("Parameters: b=", b, " m123=", m1, m2, m3, " leading to ",
sum( (ydebug-yhat)^2 ), "\n")
return( yhat );
}
sameformula= (y ~ objective.xs(b, m1, m2, m3, x, y))
cat("\nNLS2 Function --- what do you do?:\n");
print(nls2( sameformula, data=d, control= nls.control(tol=1e-12),
algorithm="...
2010 May 19
8
Generating all possible models from full model
...nd I am always worried that I am missing models or have made a mistake somewhere. It is also difficult to alter models if I want to change a term. For example, below are the set of models I would like to run. Is there a way to specify the full model and have R generate the rest? I.e. specify
m1234567<-glm.convert(glm.nb(mantas~site*year+cosmonth+sinmonth+coslunar+sinlunar+plankton, data=mydata))
and have R run all the other models.
library(MASS)
#Intercept only
m0<-glm.convert(glm.nb(mantas~1,data=mydata))
#One term - 7 models
#Manta abundance is greater at one of the two si...