
Hello,
I'm new to R and need help getting a rcspline.plot to work. I have a dataset (Fish_lesion) with the presence/absence of a parasite (coccidia) and a variety of fish measurements (total length, weight, age).
I am using logistic regression to determine if there is a relationship between coccidia infection and age or size of fish. I would like to determine if there is a linear relationship between the log odds and the predictor variables. I was given the following to generate an rcspline.plot:
library(rms)
rcspline.plot(y=Fish_lesion$Coccidia,x=Fish_lesion$Fish_TL,
nk=3,m=20)
mtext(side=1,line=2.5,'Total Length')
where Fish_lesion$Coccidia is the response variable (column with 1a and 0s)
and Fish_lesion$Fish_TL is a predictor variable (column of lengths)
the mtext() line is supposed to prompt me to click on the plot to past in wald scores
However, this is not working. I'm getting the following error message:
Error in xy.coords(x, y, recycle = TRUE, setLab = FALSE) : 'x' is a list, but does not have components 'x' and 'y'
Can anyone suggest a solution?
Thanks!
