gamlss

Response variable out of range -> using gamlss in r LOGNO

旧城冷巷雨未停 提交于 2021-01-29 18:32:55
问题 I am new to the function GAMLSS in r, and when I run my code I always get this error: Response Variable out of range After looking into the data frame, I realized the issue was one of response variables was 0.0000. I was wondering if someone could explain to me why 0 is out of range and possible solutions to go around it (ex. such as replacement the values)? 回答1: LOGNO family corresponds to the log-normal distribution, which is defined for positive values only. The possible solutions might be

dplyr: Evaluation error: object '.' not found with gamlss but all good with lm, gam, glm methods

孤街醉人 提交于 2019-12-12 14:28:51
问题 Context: tidyverse and dplyr environment/work-flow. I'd appreciate insights into how to resolve the following issue, which I have encountered while trying to work with collections of regression results. This minimal reproducible shows the issue mtcars %>% gamlss(mpg ~ hp + wt + disp, data = .) %>% model.frame() The example below illustrates a broader context and works as expected (producing the images shown). It also works if all I do is change ~lm(...) to be ~glm(...) or ~gam(...) : library

Selecting Percentile curves using gamlss::lms in R

自作多情 提交于 2019-12-08 08:39:17
问题 I am using example code from gamlss package to draw percentile curves: library(gamlss) data(abdom) lms(y,x , data=abdom, n.cyc=30) It is drawing its own set of percentile curves. How can I choose to draw only 10th, 50th and 90th percentile curves? Also I want to avoid plotting of points so that only curves are drawn. Thanks for your help. 回答1: It's always a good idea to read the help pages: > centiles(h,xvar=abdom$x, cent=c(10,50,90), points=FALSE) % of cases below 10 centile is 8.688525 % of

Getting percentile values from gamlss centile curves

会有一股神秘感。 提交于 2019-12-07 18:51:32
问题 This question is related to: Selecting Percentile curves using gamlss::lms in R I can get centile curve from following data and code: age = sample(5:15, 500, replace=T) yvar = rnorm(500, age, 20) mydata = data.frame(age, yvar) head(mydata) age yvar 1 12 13.12974 2 14 -18.97290 3 10 42.11045 4 12 27.89088 5 11 48.03861 6 5 24.68591 h = lms(yvar, age , data=mydata, n.cyc=30) centiles(h,xvar=mydata$age, cent=c(90), points=FALSE) How can I now get yvar on the curve for each of x value (5:15)

Selecting Percentile curves using gamlss::lms in R

回眸只為那壹抹淺笑 提交于 2019-12-07 17:02:31
I am using example code from gamlss package to draw percentile curves: library(gamlss) data(abdom) lms(y,x , data=abdom, n.cyc=30) It is drawing its own set of percentile curves. How can I choose to draw only 10th, 50th and 90th percentile curves? Also I want to avoid plotting of points so that only curves are drawn. Thanks for your help. It's always a good idea to read the help pages: > centiles(h,xvar=abdom$x, cent=c(10,50,90), points=FALSE) % of cases below 10 centile is 8.688525 % of cases below 50 centile is 50.16393 % of cases below 90 centile is 90 来源: https://stackoverflow.com