Total members 11621 |It is currently Wed Mar 29, 2017 7:59 pm Login / Join Codemiles

### Weka

 All times are UTC [ DST ]

 Building Quantile regression in R Tue Dec 16, 2014 6:36 am

Building Quantile regression in R Example.
Code:
require(foreign)
require(ggplot2)
require(MASS)
require(boot)
# data for analysis model.
data <- read.csv("Model14.csv",head=TRUE );
# attach data
attach(data)
# Define variables
Y <- cbind(dupdifftriage3)
X <- cbind(descriptiontextcount, titletextcount, priority_val, comment_count, cc_count,repoter_rep,bug_severity_num)
z <- cbind(titletextcount)
library(quantreg)

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

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

quantreg75 <- rq(Y ~ X, data=data, tau=0.75)
summary(quantreg75)
quantreg90 <- rq(Y ~ X, data=data, tau=0.90)
summary(quantreg90)
# Simultaneous quantile regression
quantreg2575 <- rq(Y ~ 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
Canada

 Tweet
Author:
 Posts: 34Have thanks: 1 time
 Re: Building Quantile regression in R Wed Nov 25, 2015 11:44 am

updated.

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

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

Related Posts  to : Building Quantile regression in R
need help building table in my database!     -

 All times are UTC [ DST ]

### 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