[R] How to calculate vif of each term of model in R?

2015-04-08 Thread Methekar, Pushpa (GE Transportation, Non-GE)
I am beginner in R doing modelling in R, I loaded excel sheet in R, i have chosen x elements and y elements then fitted model for linear and second order regression. Now I have both models. I am bit confused how to calculate vif for each term in model like e.g model1-lm(y1~x1+x2+.x9)

[R] covert entire dataset to numeric while persuing percentage values

2015-02-26 Thread Methekar, Pushpa (GE Transportation, Non-GE)
Hi , I am little confused about how to covert entire dataset to numeric . As I read data like.. Xelements =read.csv(file. Choose(),header = T, stringsAsFactors=FALSE) str(xelements ) str(xelements) 'data.frame': 731 obs. of 4 variables: $ Engine.Speed : chr rpm ES rpm 1049 ... $

[R] global environment

2015-01-13 Thread Methekar, Pushpa (GE Transportation, Non-GE)
Sorry it was my mistake. I tried to do like this rm.outliers = function(model,xsys) { rst = rstudent(model) outliers-vector(numeric,731) xsys-xsys for(i in 1:length(rst)) { if(rst[i]=3 rst[i]=-3) #condition for identifying outlier { print(this is not outlier)

[R] global environment

2015-01-12 Thread Methekar, Pushpa (GE Transportation, Non-GE)
Hi I am trying to make some changes in data frame and return it to function .this is my function rm.outliers = function(model,xsys) { rst = rstudent(model) outliers-vector(numeric,10) xsys-xsys for(i in 1:length(rst)) { if(rst[i]-3 rst[i]=-3) { #print(this is not

[R] find and remove outlier

2015-01-05 Thread Methekar, Pushpa (GE Transportation, Non-GE)
Hi, this is my function to find rstudent of model which will give me outlier But I wonder if I could find out the exact no. of outlier in data set. Like outlierTest() does from car package . rm.outliers = function(dataset,model){ dataset$rstudent = rstudent(model) for(i in

[R] remove outlier

2015-01-02 Thread Methekar, Pushpa (GE Transportation, Non-GE)
Hi , I am working on a function . rm.outliers = function(dataset,model){ dataset$predicted = predict(model) dataset$stdres = rstudent(model) m = 1 for(i in 1:length(dataset$stdres)){ dataset$outlier_counter[i] = if(dataset$stdres[i] = 3 |

[R] to create a fuction for removing outlier

2014-12-30 Thread Methekar, Pushpa (GE Transportation, Non-GE)
Hi all, Thanks for your support. sorry for inconvenience cause due to lack of information. here is my all r- program . read in data raw=read.csv(file.choose(),header = T, stringsAsFactors=FALSE) str(raw) conversion from factor to numeric of xs raw$Engine.Speed -

[R] fuction to find outlier

2014-12-29 Thread Methekar, Pushpa (GE Transportation, Non-GE)
Hi all, I am stuck on outlier, while doing regression analysis. I done up to modelling ,I got lm model for each y and x. Now I want to find out outlier in that models. How do I find out outlier and remove them. for(i in 1:10){ t1=print(outlierTest(fitted.modely1.temp.l ,cutoff=0.05, n.max=1,