[R] To modify FMCD

2014-01-13 Thread Hock Ann Lim
Dear R Experts, Can anyone teach me how to modify the FMCD algorithm in R. If I wish to replace the C-step in FMCD by the index set. Let I(old)={pi(1)old,pi(2)old,...,p(h)old} and I(new)={pi(1)new, pi(2)new,..,p(h)new} the index sets that correspond to the sample items in H(old) and H(new) res

Re: [R] Problem with Stationary Bootstrap

2012-09-17 Thread Hock Ann Lim
2 + 3*X a <- data.frame(X = X, Y = Y) fun <- function(a){   fit <- lm(Y ~ X, data=a)   return(coef(fit)) } result <- boot::tsboot(a, statistic = fun, R = 10, sim = "geom", l = 10, orig.t = TRUE) Hope this helps, Rui Barradas Em 17-09-2012 14:42, Hock Ann Lim escreve

[R] Problem with Stationary Bootstrap

2012-09-17 Thread Hock Ann Lim
Dear R experts,   I'm running the following stationary bootstrap programming to find the parameters estimate of a linear model:     X<-runif(10,0,10) Y<-2+3*X a<-data.frame(X,Y) coef<-function(fit){   fit <- lm(Y~X,data=a)    return(coef(fit)) }  result<- tsboot(a,statistic=coef(fit),R = 10,n.sim

[R] Autocorrelation Rho Greater Than One

2011-02-26 Thread Hock Ann Lim
Dear R Users, Kindly advice me what's wrong in my programming. I'm using the Cochrane-Orcutt two stage procedure with Prais Wisten transformation, below is my R programming : >Y<-c(60.8,62.5,64.6,66.1,67.7,69.1,71.7,73.5,76.2,77.3,78.8,80.2,82.6,84.3,83.3,84.1,86.4,87.6,89.1,89.3,89.1, >, + 89

[R] Cochrane-Orcutt Prais Winsten

2011-02-21 Thread Hock Ann Lim
Dear R users,    May I know is there a package that implements the Cochrane-Orcutt Prais Winsten itterative for dealing with autocorrelation in a regression model? I understand that gls in nlme package does it properly, my question is will this two methods provide the same answer for linear mod

[R] How to programme R to randomly replace some X values with Outliers

2010-10-02 Thread Hock Ann Lim
Dear experts, I am a beginner of R. I'm looking for experts to guide me how to do programming in R in order to randomly replace 5 observations in X explanatory variable with outliers drawn from U(15,20) in sample size n=100. The replacement subject to y < 15. The ultimate goal of my study is to

[R] R-Square for Robust Regression Model

2010-10-01 Thread Hock Ann Lim
May I know how to find the R-squared for robust regression model?   Thank you.   Hock Ann [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting