Dear forumists,
My apologies if this has been addressed before.
The following will illustrate the problem with pseudo data. I am using R 3.0.1.
library(ggplot2)
library(gamlss)
r1=rnorm(100)
r2=rnorm(100)
d=data.frame(r1,r2)
p=ggplot(d,aes(r1,r2))+geom_point()+stat_smooth(method="gamlss", formula=y~x,family=NO,se=F)
print(p)
GAMLSS-RS iteration 1: Global Deviance = 274.2988
GAMLSS-RS iteration 2: Global Deviance = 274.2988
Error in data.frame(data, source = namelist) :
arguments imply differing number of rows: 80, 81
The gamlss package is fine in this case as this will show
mod1 = gamlss(formula=r2~r1,family=NO,data=d)
GAMLSS-RS iteration 1: Global Deviance = 274.2988
GAMLSS-RS iteration 2: Global Deviance = 274.2988
summary(mod1) yields the model estimate as expected
What do I need to do to get stat_smooth to work with the gamlss method?
Daniel