非線形分位点回帰の次のワークフローは機能しているようです。ただし、結果の曲線をプロットする方法がわかりません。
ところで: 私は関数 graphics::curve() の代わりに graphics::lines() を使用したいと思います
require(quantreg)
# load sample data
dat <- DNase
# introduce variable
x <- DNase$conc
y <- DNase$density
# introduce function
f <- function(a, b, x) {(a*x/(b+x))}
# fit the model
fm0 <- nls(log(y) ~ log(f(a,b,x)), dat, start = c(a = 1, b = 1))
# fit a nonlinear least-square regression
fit <- nls(y ~ f(a,b,x), dat, start = coef(fm0))
# receive coeffientes
co <- coef(fit)
a=co[1]
b=co[2]
# plot
plot(y~x)
# add curve
curve((a*x/(b+x)), add=T)
# then fit the median using nlrq
dat.nlrq <- nlrq(y ~ SSlogis(x, Asym, mid, scal), data=dat, tau=0.5)
# add curve
???
編集: 私が探しているのは、a*x/(b+x) のような数式のさまざまな分位点回帰をプロットする方法です。式を挿入すると、「開始」引数として何を入力するかという問題が生じます
dat.nlrq.075 <- nlrq(formula=fit, data = dat, start=???, tau = 0.75)