Displaying 20 results from an estimated 10000 matches similar to: "padding specific missing values with NA to allow cbind"
2011 Feb 09
5
Removing Outliers Function
I am working on a function that will remove outliers for regression analysis.
I am stating that a data point is an outlier if its studentized residual is
above or below 3 and -3, respectively. The code below is what i have thus
far for the function
x = c(1:20)
y = c(1,3,4,2,5,6,18,8,10,8,11,13,14,14,15,85,17,19,19,20)
data1 = data.frame(x,y)
rm.outliers =
2009 Dec 10
1
Detectar outliers en un gráfico de dispersión
Hola amigos, esta es mi primera duda, espero que no sea demasiado fácil.
Tengo unos datos de dos variables y quiero mostrar recta de regresión
y valor de correlación
serie0 <- c(0.651, 0.712, 0.614, 0.645, 0.559, 0.647, 0.642, 0.534,
0.616, 0.621, 0.623)
serie1 <- c(0.572, 0.641, 0.565, 0.596, 0.518, 0.604, 0.602, 0.501,
0.58, 0.589, 0.596)
data <- cbind(serie0, serie1)
colnames(data)
2009 Dec 10
0
Detectar outliers en un gráfico de dispersión SOLUCION
Bueno, ya lo he solucionado gracias a Carlos
me ha enviado un correo en privado (supongo que se ha despistado, si
no lo querías hacer público ya es tarde) con esta info:
--
Creo que lo tienes (en formato básico) aquí:
https://stat.ethz.ch/pipermail/r-help/2007-November/146285.html
Aunque pensaba que si tu objetivo último es el de que usuarios
"potencialmente tontos" sean capaces de
2010 Sep 15
2
labeling outliers with subject numberss
How can I get the outlier in this boxplot of "Score" to be represented by
the corresponding value in "SubNo"?
score=c(6,6,7,14,5,7,6,8)
SubNo=1:8
mydata=data.frame(SubNo, score)
boxplot(mydata$score)
Thanks!
Kevin
[[alternative HTML version deleted]]
2003 Aug 28
4
R-help: beginner question
Hi,
I am a beginner user of R. I have a trivial question ? I am almost
ashamed I cannot figure it out does not matter how many times I
am reading the help.
I have a table in .txt format, tab delimited. I can read it with
?read.delim()? with no problems.
Afterwards I would like to use boxplot function to see if there
are any outliers in the column 5 of my data called TPAH16.ppm
In the
2011 Nov 16
2
outlier identify in qqplot
Dear Community,
I want to identify outliers in my data. I don't know how to use identify
command in the plots obtained.
I've gone through help files and use mahalanobis example for my purpose:
NormalMultivarianteComparefunc <- function(x) {
Sx <- cov(x)
D2 <- mahalanobis(x, colMeans(x), Sx)
plot(density(D2, bw=.5), main="Squared Mahalanobis distances, n=nrow(x),
2010 Nov 10
1
standardized/studentized residuals with loess
Hi all,
I'm trying to apply loess regression to my data and then use the fitted
model to get the *standardized/studentized residuals. I understood that for
linear regression (lm) there are functions to do that:*
*
*
fit1 = lm(y~x)
stdres.fit1 = rstandard(fit1)
studres.fit1 = rstudent(fit1)
I was wondering if there is an equally simple way to get
the standardized/studentized residuals for a
2004 Jan 20
2
rstandard.glm() in base/R/lm.influence.R
I contacted John Fox about this first, because parts of the file are
attributed to him. He says that he didn't write rstandard.glm(), and
suggests asking r-devel.
As it stands, rstandard.glm() has summary(model)$dispersion outside the
sqrt(), while in rstandard.lm(), the sd is already sqrt()ed. This seems to
follow stdres() in VR/MASS/R/stdres.R.
Of course for the c("poisson",
2010 Apr 05
2
find the "next non-NA" value within each row of a data-frame
#I wish to find the "next non-NA" value within each row of a data-frame.
#e.g. I have a data frame mydata. Rows 1, 2 & 3 have soem NA values.
mydata <- data.frame(matrix(seq(20*6), 20, 6))
mydata[1,3:5] <- NA
mydata[2,2:3] <- NA
mydata[2,5] <- NA
mydata[3,6] <- NA
mydata[1:3,]
#this loop accomplishes the task; I am tryign toi learn a "better" way
for(i
2011 Jun 20
2
Replace selected columns of a dataframe with NA
I am using the following command to replace all the missing values and
assorted typos in a dataframe with NA:
mydata[mydata>80]=NA
The problem is that the first column contains values which should be
more than 80, so really I want to do it just for
mydata[,2:length(mydata)]
I can't seem to re-write the code to fit:
mydata[,2:length(mydata)>80]=NA # no error message, but doesn't
2008 Apr 16
1
Brown-Forsythe F* Statistic
I've been searching around for a function for computing the
Brown-Forsythe F* statistic which is a substitute for the normal ANOVA
F statistic for when there are unequal variances, and when there is
evidence of non-normality. A couple of other people have asked this
question, the responses I found have been:
?oneway.test
However, that function appears to use the Welch W statistic which,
2005 Apr 13
1
How to plot Contour with NA in dataframe
Dear friends,
I am trying to produce Contour Plot with R, but there are some NA
in my data matrix. After I ran the following R script, I got the error
message:"no proper `z' matrix specified". Does anybody know how to plot
contour chart with R for the non-strict matrix?
Thank you in advance!!!
2013 Dec 07
1
How to perform clustering without removing rows where NA is present in R
I have a data which contain some NA value in their elements.
What I want to do is to **perform clustering without removing rows**
where the NA is present.
I understand that `gower` distance measure in `daisy` allow such situation.
But why my code below doesn't work?
__BEGIN__
# plot heat map with dendogram together.
library("gplots")
library("cluster")
2018 Mar 04
2
lmrob gives NA coefficients
Thanks for your reply.
I use mvrnorm from the *MASS* package and lmrob from the *robustbase*
package.
To further explain my data generating process, the idea is as follows. The
explanatory variables are generated my a multivariate normal distribution
where the covariance matrix of the variables is defined by Sigma in my
code, with ones on the diagonal and rho = 0.15 on the non-diagonal. Then y
2010 Sep 14
1
NA confusion (length question)
Hi folks,
I am running a very simple regression using
mylm <- lm(mass ~ tarsus, na.action=na.exclude)
I would like the use the residuals from this analysis for more
regression but I'm running into a snag when I try
cbind(mylm$residuals, mydata) # where my data is the original data set
The error tells me that it cannot use cbind because the length of
mylm$residuals is
2018 Mar 04
0
lmrob gives NA coefficients
What is 'd'? What is 'n'?
On Sun, Mar 4, 2018 at 12:14 PM, Christien Kerbert <
christienkerbert at gmail.com> wrote:
> Thanks for your reply.
>
> I use mvrnorm from the *MASS* package and lmrob from the *robustbase*
> package.
>
> To further explain my data generating process, the idea is as follows. The
> explanatory variables are generated my a
2008 Jan 01
1
Variable scope R 2.6.1
I have the following procedure which worked just fine for in R 2.2.0.
Recently I upgraded to 2.6.1 and now get an error:
> ScatterOutlier(pass_500_506[1:1000,6:12], marginal_500_506[,6:12])
Error in eval(expr, envir, enclos) : object "out" not found
Note that I use the same workspace (and hence data) as in 2.2.0.
When I make sure that the object "out" exists at
2011 Sep 28
1
removing outliers in non-normal distributions
Hello,
I'm seeking ideas on how to remove outliers from a non-normal distribution
predictor variable. We wish to reset points deemed outliers to a truncated
value that is less extreme. (I've seen many posts requesting outlier removal
systems. It seems like most of the replies center around "why do you want to
remove them", "you shouldn't remove them", "it
2004 Apr 05
3
Can't seem to finish a randomForest.... Just goes and goe s!
When you have fairly large data, _do not use the formula interface_, as a
couple of copies of the data would be made. Try simply:
Myforest.rf <- randomForest(Mydata[, -46], Mydata[,46],
ntrees=100, mtry=7)
[Note that you don't need to set proximity (not proximities) or importance
to FALSE, as that's the default already.]
You might also want to use
2018 Mar 04
1
lmrob gives NA coefficients
d is the number of observed variables (d = 3 in this example). n is the
number of observations.
2018-03-04 11:30 GMT+01:00 Eric Berger <ericjberger at gmail.com>:
> What is 'd'? What is 'n'?
>
>
> On Sun, Mar 4, 2018 at 12:14 PM, Christien Kerbert <
> christienkerbert at gmail.com> wrote:
>
>> Thanks for your reply.
>>
>> I use