Linear model no longer working?

13 views
Skip to first unread message

Bruce Miller

unread,
Aug 10, 2019, 10:32:48 AM8/10/19
to ded...@googlegroups.com
Hi all,

I have a new installation of Deducer running under R 3.6.0 on my new workstation Win 10 64 bit OS.
Seems everything else is functioning fine.
However,  while this Linear Model did work previously it is not working now.
Data file is same format I have always used with

Data frame is a simple 3 columns:
SPEC_CODE (Character), FA (double) and FC (double)

Puzzled.

Error is as follows:


> Bats[["predicted.link"]] <- predict(model.lm, newdata=Bats)
Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) :
  factor as.factor(FA) has new levels 27, 31.4, 32.5, 33.3, 33.5, 35.8, 35.9, 36, 36.4, 39.1, 39.4, 40.2, 41, 61
> rm('model.lm')
>

Steps used with Deducer that have been archived and worked previously:


Go to:
·         Analysis
·         Linear Model
·         Add Fc as outcome
·         FA as Factor
·         Click continue
·         Click continue
·         Click EXPORT button on right
·         Check Predicted box
·         Click RUN

Also the direct code saved was this:

model.lm <- lm(formula=FC ~ FA,data=Bats,na.action=na.omit)
Anova(model.lm,type='II')
summary(model.lm)
tmp<-predict(model.lm,Bats)
Bats[names(tmp),"predicted.2"]<-tmp
rm('tmp')
rm('model.lm')

Any suggestions to get the FC predictions to run again appreciated.

Cheers,
Bruce

rudolf....@gmail.com

unread,
Aug 19, 2019, 3:21:33 AM8/19/19
to Deducer
Linear models and predict still working here MacOs 10.14.6, R 3.6.1, Deducer 0.7-9
 
aa[["predicted.link"]] <- predict(model.lm, newdata=aa)

The problem seems to be related to your factors.
Reply all
Reply to author
Forward
0 new messages