frame_nlrq: Visualization of fitting process of non-linear quantile...

Description Usage Arguments Details Value Author(s) Examples

View source: R/frame_nlrq.R

Description

This function explore the fitting process of nonlinear quantile regression

Usage

1

Arguments

formula

non-linear quantile regression model

data

data frame

tau

quantiles

start

the initial value of all parameters to estimate, must be a list

Details

To extentd the linear programming method to the case of non-linear response functions, Koenker & Park(1996) considered the nonlinear l_{1} problem

min_{t\in R^{p}} ∑{|f_{i}(t)|}

where, for example,

f_{i}(t)=y_i-f_{0}(x_i, t)

As noted by El Attar et al(1979) a necessary condition for t* to solve min_{t\in R^{p}} ∑{|f_{i}(t)|} is that there exists a vector d \in [-1, 1]^n such that

J(t*)^{'}d = 0

f(t*)^{'}d = ∑{|f_i(t*)|}

where f(t)=(f_i(t)) and J(t)=(\partial f_i(t)/\partial t_j). Thus, as proposed by Osborne and Watson(1971), one approach to solving min_{t\in R^{p}} ∑{|f_{i}(t)|} is to solve a succession of linearized l_1 problems minimizing

∑ |f_{i}(t)-J_{i}(t)^{'}δ|

Value

Weighted observations in non-linear quantile regression model fitting using interior algorithm

Author(s)

Wenjing Wang wenjingwangr@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(tidyr)
library(ggplot2)
library(purrr)
x <- rep(1:25, 20)
y <- SSlogis(x, 10, 12, 2) * rnorm(500, 1, 0.1)
Dat <- data.frame(x = x, y = y)
formula <- y ~ SSlogis(x, Aysm, mid, scal)
nlrq_m <- frame_nlrq(formula, data = Dat, tau = c(0.1, 0.5, 0.9))
weights <- nlrq_m$weights
m <- data.frame(Dat, weights)
m_f <- m %>% gather(tau_flag, value, -x, -y)
ggplot(m_f, aes(x = x, y = y)) +
  geom_point(aes(size = value, colour = tau_flag)) +
  facet_wrap(~tau_flag)

quokar documentation built on May 2, 2019, 6:39 a.m.