Total members 11841 |It is currently Tue Jan 19, 2021 11:18 pm Login / Join Codemiles

### Weka

Building a Quantile regression model in R script. Following example show the quantile regression at different quantile values (10%, 25%, 50%, .. 100%). Quantile regression model is important to understand the role of your model varriables along the different percentiles of your data.
Code:
require(foreign)
require(ggplot2)
require(
MASS)
require(
boot)
# data for analysis model.
# attach data
attach(data)
# Define variables
<- cbind(dupdifftriage3)
<- cbind(descriptiontextcount, titletextcount, priority_val, comment_count, cc_count,repoter_rep,bug_severity_num)
<- cbind(titletextcount)
library(quantreg)

# Quantile regression
quantreg10 <- rq(~ X, data=data, tau=0.1)
summary(quantreg10)
quantreg25 <- rq(~ X, data=data, tau=0.25)
summary(quantreg25)

quantreg50 <- rq(~ X, data=data, tau=0.5)
summary(quantreg50)

quantreg75 <- rq(~ X, data=data, tau=0.75)
summary(quantreg75)
quantreg90 <- rq(~ X, data=data, tau=0.90)
summary(quantreg90)
# Simultaneous quantile regression
quantreg2575 <- rq(~ X, data=data, tau=c(0.1, 0.95))
summary(quantreg2575)

# ANOVA test for coefficient differences
anova(quantreg25, quantreg75)

# Plotting data
quantreg.all <- rq(log(Y+1) ~ X, tau = seq(0.05, 0.95, by = 0.05), data=data)
quantreg.plot <- summary(quantreg.all)
plot(quantreg.plot)

quantreg
.all <- rq(log(Y+1) ~ z, tau = seq(0.05, 0.95, by = 0.05), data=data)
quantreg.plot <- summary(quantreg.all)
plot(quantreg.plot)

_________________
Sami
PHD student - SAIL - School Of Computing
Queens' University

 Tweet
Author:
 Posts: 33Have thanks: 1 time

updated.

_________________
Sami
PHD student - SAIL - School Of Computing
Queens' University

 Tweet
Author:
 Posts: 33Have thanks: 1 time
 Page 1 of 1 [ 2 posts ]

Related Posts  to : Building Quantile regression in R
Build Linear Regression in Python - Supervised Learning     -
need help building table in my database!     -

### Topic Tags

R Analysis

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com