Off topic:Linear model error: fitted()
0
0
Entering edit mode
5.7 years ago
oars ▴ 200

Hello,

I'm trying to use the fitted() function in order to retrieve the fitted (predicted) value of D2R at each value in G. I've tried the following R syntax but don't understand why I'm receiving the following error?

plot( fitted( lm.34852.g.at),
     d2r.34852[is.na(d2r.34852$D2R),"D2R"],
     xlab = "Fitted", ylab = "Observed")

 

Error in xy.coords(x, y, xlabel, ylabel, log) : 
      'x' and 'y' lengths differ

I've also tried separating the plot and fitted() portion of the code but still cannot seem to get this code to work correctly?

R linear model • 1.8k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 1779 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6