Displaying 7 results from an estimated 7 matches for "fasttau".
2018 Apr 06
1
Fast tau-estimator line does not appear on the plot
...brary(MASS)
Huber=rlm(Y ~ X)
abline(Huber,col="red")
Tukey=rlm(Y ~ X,psi=psi.bisquare)
abline(Tukey,col="purple")
install.packages("quantreg")
library(quantreg)
L1=rq(Y ~ X,tau=0.5)
abline(L1,col="blue")
install.packages("RobPer")
library(RobPer)
FastTau(Y,X)
fast=FastTau(Y,X)
abline(unlist(fast), col="yellow")
legend("topright",c("OLS",?"L1",?"Huber M-estimator", "Tukey", "MM", "fast tau"),inset=0.02,lwd=2,col=c("black","blue","red","...
2018 Mar 31
0
Fast tau-estimator line does ot appear on the plot
...= Dataset,psi=psi.bisquare)
> abline(Tukey,col="purple")
>
> install.packages("quantreg")
> library(quantreg)
> L1=rq(Z ~ Y, data = Dataset,tau=0.5)
> abline(L1,col="blue")
>
> install.packages("RobPer")
> library(RobPer)
> FastTau(Z,Y)
> fast=FastTau(Z,Y)
> abline(fast, col="yellow")
abline() doesn't know what to do with the "fast" object. It isn't a
vector containing intercept and slope, it's a list containing them. So
you'll need something like
abline(unlist(fast), col="...
2018 Mar 31
2
Fast tau-estimator line does ot appear on the plot
...e(Huber,col="red")
Tukey=rlm(Z ~ Y, data = Dataset,psi=psi.bisquare)
abline(Tukey,col="purple")
?
install.packages("quantreg")
library(quantreg)
L1=rq(Z ~ Y, data = Dataset,tau=0.5)
abline(L1,col="blue")
?
install.packages("RobPer")
library(RobPer)
FastTau(Z,Y)
fast=FastTau(Z,Y)
abline(fast, col="yellow")
##########
?
2018 Apr 07
0
Fast tau-estimator line does not appear on the plot
...X )
abline( reg, col = "green" )
Huber <- rlm( Y ~ X )
abline( Huber, col="red" )
Tukey <- rlm( Y ~ X, psi = psi.bisquare )
abline( Tukey, col = "purple" )
L1 <- rq( Y ~ X, tau = 0.5 )
abline( L1, col = "blue" )
fast <- FastTau(model.matrix(~X),Y)
fast # save result, then print... avoid computing twice
# model matrix leads to first element of beta as constant and
# second element of beta as slope
abline( fast$beta, col="yellow" )
legend( "topright"
, c( "OLS"...
2018 Apr 13
0
cvTools for 2 models not working
Dear R-experts,
I am trying to do cross-validation for different models using the cvTools package.
I can't get the CV for the "FastTau" and "hbrfit". I guess I have to write my own functions at least for hbrfit. What is going wrong with FastTau ?
Here below the reproducible example. It is a simple toy example (not my real dataset) with many warnings, what is important to me are the errors.
###CROSS-VALIDATION
####...
2018 Apr 21
0
Cross-validation : can't get the predicted response on the testing data
...69,32)
# Create a dataframe
BIO<-data.frame(A,B,C)
?
# randomize sampling seed
set.seed(1)
n=dim(BIO)[1]
p=0.667
# Sample size
sam=sample(1?:n,floor(p*n),replace=FALSE)
# Sample training data
Training =BIO [sam,]
# Sample testing data
Testing = BIO [-sam,]
?
# Build the 2 models
fit<- FastTau(model.matrix(~Training$A+Training$B),Training$C)
HBR<-hbrfit(C ~ A+B)
# Predict the response on the testing data
ypred=predict(fit,newdata=Testing)
ypred=predict(HBR,newdata=Testing)
# Get the true response from testing data
y=BIO[-sam,]$D
?# Get error rate
RMSE=sqrt(mean((y-ypred)^2))
RMSE
M...
2018 Apr 25
0
Zero errors : Bug in my R code ?
...ata=newdata)
DMwR::regr.eval(newdata$crp,Huber$fitted.values)
Tukey <- rlm( crp ~ bmi+glucose, data=newdata, psi = psi.bisquare )
DMwR::regr.eval(newdata$crp,Tukey$fitted.values)
L1 <- rq( crp ~ bmi+glucose, data=newdata, tau = 0.5 )
DMwR::regr.eval(newdata$crp,L1$fitted.values)
fast <- FastTau(model.matrix(~newdata$bmi+newdata$glucose),newdata$crp)
DMwR::regr.eval(newdata$crp,fast$fitted.values)
HBR<-hbrfit(crp ~ bmi+glucose)
DMwR::regr.eval(newdata$crp,HBR$fitted.values)