Hi! I want to create a plot of a predicted term similar to the function term.plot() in the gamlss package. I have tried several options, but I could not work it out so far...
Thank you for your help! Nikolaus here is my example: library(gamlss) data(rent) attach(rent) # Estimating some model rent.model <- gamlss(R ~ ps(Fl)+ps(A)+Sp+Sm, family="NO") summary(rent.model) # Predicting the values for term A A_pred <- predict(rent.model, type="terms", what="mu", terms=2, se.fit=TRUE) # Calculating only the fitted values without se.fit fitted_A <- A_pred$fit # This is my problem: I want to plot the fitted smooth function without using the R function term.plot(), but the function lines() computes an unuseful graph... plot(A, fitted_A, type="n") lines(A, fitted_A) # I want to create a plot like term.plot() does term.plot(rent.model, terms=2, se=TRUE) ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.