Thanks Jim. names(r) <-- command worked...
I still get this error although I get the estimates and their standard
errors...
> fm2 <- maxlike(~x1 + x2 + x3, r, xy)
Warning message:
In layerNames(rasters) :
the layerNames function is obsolete. Use "names" instead
Coefficients:
That's because the function maxlike explicitly calls "layerNames(rasters)" in
cd.names <- layerNames(rasters)
By typing
maxlike()
you can see the code and find the statement mentioned above. The two fixes are
(1) make your own version of maxlike with the "names" fix and/or write the
#Conditional inference forest ("Party" package) error message states
that levels in factors of new data do not match original data, but they
do...
#create conditional inference forest
oc_listed.fit1 <- cforest(Listed~
HabMode,controls=cforest_unbiased(ntree=500), data=oc.complete)
#use predi