similar to: estimating missing data

Displaying 20 results from an estimated 5000 matches similar to: "estimating missing data"

2002 Jun 14
2
exponential smoothing
could someone help me to write a fonction doing an exponential smoothing in case of a multivariate time serie? I tried ewma <- function (x, lambda = 1, init = 0) { if (is.ts(x)) filter(lambda*x, filter=1-lambda, method="recursive", init=init) else stop(message="first argument should be a time serie") } but I can't apply that to multivariate Thanks
2002 Jul 23
1
function running in package gregmisc
Hello, I've got a problem using the function "running" in package gregmisc For example: test<-c(1,2,3,4,5) running(test,fun=var,width=3) gives 1:1 1:2 1:3 2:4 3:5 NA NA 2 3 4 which is wrong because var(test[1:3]) [1] 1 Where am I wrong? Thanks Xavier -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2002 Aug 19
1
install the SJava package on unix
Hi, I've got a problem to use the SJava package with R. I have a SUN solaris 8 machine. Then I did R INSTALL -c SJava_0.65-0.tar.gz without problem Now I try the test provided on the web site: library(SJava) and here I receive the error message: Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library
2009 Mar 12
1
alternative to EMV?
I need a package that can compute missing values of n-dimensional vectors for n > 2. This is a kind of interpolation, complicated in dimensions higher than 2. The idea is that I have a set of fully specified vectors (i.e., with no missing values) and I get a new vector that has one or more missing attributes; I need to fill in the missing values with values that are, based on the 'training
2010 Mar 31
2
Simplifying particular piece of code
Hello, everyone I have a piece of code that looks like this: mrets <- merge(mrets, BMM.SR=apply(mrets, 1, MyFunc, ret="BMM.AV120", stdev="BMM.SD120")) mrets <- merge(mrets, GM1.SR=apply(mrets, 1, MyFunc, ret="GM1.AV120", stdev="GM1.SD120")) mrets <- merge(mrets, IYC.SR=apply(mrets, 1, MyFunc, ret="IYC.AV120",
2011 May 04
1
Error Rscript: No such file or directory
Hello, I'm trying to build a simple cpp file using the R CMD SHLIB command and I always receive the same error message: cygwin warning: MS-DOS style path detected: C:/PROGRA~1/R/R-212~1.1/etc/i386/Makeconf Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-212~1.1/etc/i386/Makeconf CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult
2004 Sep 01
1
error in mle
Friends I'm trying fit a survival model by maximum likelihood estimation using this function: flver=function(a1,a2,b1,b2) { lver=-(sum(st*log(exp(a1*x1+a2*x2)))+sum(st*log(hheft(exp(b1*x1+b2*x2)*t,f.heft))) -(exp(a1*x1+a2*x2)/exp(b1*x1-b2*x2))*sum(-log(1-pheft(exp(b1*x1+b2*x2)*t,f.heft)))) } emv=mle(flver,start=list(a1=0,a2=0,b1=0,b2=0)) where hheft and pheft are functions defined in
2001 Oct 11
2
Where's MVA?
Hi All: Package TSERIES is stated to depend on MVA. However, there is no MVA package to be found under the list of package sources. Best wishes, ANDREW tseries: Package for time series analysis Package for time series analysis with emphasis on non-linear and non-stationary modelling Version: 0.7-6 Depends: ts, mva, quadprog Date: 2001-08-27 Author: Compiled by Adrian
2009 Apr 15
1
"utils" lacking namespace?
Hi all, A colleague of mine tried to install the package EMV, which had been removed from CRAN. she ran into some kind of trouble, R locked up, and she closed the program. Now when she starts R, "utils" can't be loaded which of course create an unworkable environment. Below I've copy-pasted the error message she gets when starting R. Any ideas on what went wrong, and more
2004 Jul 26
1
do.call and double-colon access
Using R 2.0.0 of July 20 2004 train, test, and cl as defined in example(knn), we have > search() [1] ".GlobalEnv" "package:methods" "package:stats" "package:graphics" [5] "package:utils" "Autoloads" "package:base" > knn(train, test, cl, k=3) Error: couldn't find function "knn" >
2011 Sep 08
1
error in knn: too many ties in knn
Hello. I found the behavior of knn( http://stat.ethz.ch/R-manual/R-devel/library/class/html/knn.html) function looking very strange. Consider the toy example. > library(class) > train <- matrix(nrow=5000,ncol=2,data=rnorm(10000,0,1)) > test <- matrix(nrow=10,ncol=2,data=rnorm(20,0,1)) > cl <- rep(c(0,1),2500) > knn(train,test,cl,1) [1] 1 1 0 0 1 0 1 1 0 1 Levels: 0 1 It
2004 Feb 02
2
Nearest Neighbor Algorithm in R -- again.
Several of the methods I use for analyzing large data sets, such as WinGamma: determining the level of noise in data Relief-F: estimating the influence of variables depend on finding the k nearest neighbors of a point in a data frame or matrix efficiently. (For large data sets it is not feasible to compute the 'dist' matrix anyway.) Seeing the proposed solution to "[R] distance
2006 Jun 07
1
knn - 10 fold cross validation
Hi, I was trying to get the optimal 'k' for the knn. To do this I was using the following function : knn.cvk <- function(datmat, cl, k = 2:9) { datmatT <- (datmat) cv.err <- cl.pred <- c() for (i in k) { newpre <- as.vector(knn.cv(datmatT, cl, k = i)) cl.pred <- cbind(cl.pred, newpre) cv.err <- c(cv.err, sum(cl != newpre)) }
2008 Sep 19
3
How to do knn regression?
Hello, I want to do regression or missing value imputation by knn. I searched r-help mailing list. This question was asked in 2005. ksmooth and loess were recommended. But my case is different. I have many predictors (p>20) and I really want try knn with a given k. ksmooth and loess use band width to define neighborhood size. This contrasts to knn's variable band width via fixing a
2011 Aug 31
8
!!!function to do the knn!!!
hi, r users i have a problem with KNN. i have 2 datasets, X0 and X1. >dim(X0) >1471*13 dim(X1) >5221*13 and for every instances in the dataset X1, i want to find the nearest neighbour(1nn) in the dataset X0. and i dont have the true classifications of dataset X1. but the function knn() need true classifications(cl) to do prediction. i just curious if there are some other function
2010 Mar 09
1
create picture (k -the nearest neighbours)
Hi I want to create a nice picture about my result of k -the nearest neighbours algorithm. Here is my easy code: ################################# library(klaR) library(ipred) library(mlbench) data(PimaIndiansDiabetes2) dane=na.omit(PimaIndiansDiabetes2)[,c(2,5,9)] dane[,2]=log(dane[,2]) dane[,1:2]=scale(dane[,1:2]) zbior.uczacy=sample(1:nrow(dane),nrow(dane)/2,F)
2007 Apr 11
1
Function knn.dist from knnflex library
Hello, I am feeling that this question can have a very simple answer, but I can't find it. I need to use the function knn.dist from knnflex library. Whatever I try, I get the error: Error in as.vector.dist(x, "character") : unused argument(s) ("character") First example: > a<-NULL > a<-rbind(a,c(5.2,-8.1)) > a<-rbind(a,c(8.8,-16.1)) >
2008 Oct 29
1
Help with impute.knn
ear all, This is my first time using this listserv and I am seeking help from the expert. OK, here is my question, I am trying to use impute.knn function in impute library and when I tested the sample code, I got the error as followingt: Here is the sample code: library(impute) data(khanmiss) khan.expr <- khanmiss[-1, -(1:2)] ## ## First example ## if(exists(".Random.seed"))
2004 May 05
1
Segfault from knn.cv in class package (PR#6856)
The function knn.cv in the class package doesn't have error checking to ensure that the length of the classlabel argument is equal to the number of rows in the test set. If the classlabel is short, the result is often a segfault. > library(class) > dat <- matrix(rnorm(1000), nrow=10) > cl <- c(rep(1,5), rep(2,5)) > cl2 <- c(rep(1,5), rep(2,4)) > knn.cv(dat, cl) [1] 2
2011 Mar 02
2
*** caught segfault *** when using impute.knn (impute package)
hi, i am getting an error when calling the impute.knn function (see the screenshot below). what is the problem here and how can it be solved? screenshot: ################## *** caught segfault *** address 0x513c7b84, cause 'memory not mapped' Traceback: 1: .Fortran("knnimp", x, ximp = x, p, n, imiss = imiss, irmiss, as.integer(k), double(p), double(n), integer(p),