rdporto1
2006-Nov-15 20:33 UTC
[R] ??: Re:??: Re: Need help in waveslim package: imodwt and universal.thresh.modwt
Airon, I don't think you have to find an English computer 'cause the following must work in your Chinese one :-) Let me explain. First of all, change your lines to xdata <- ckhdat$Adj..Close[1:1447] #names(ckhdwt.la8) <- c("w1", "w2", "w3", "w4", "w5","w6", "v6") note the # sign, i.e., DO NOT change the names before the function imodwt. This is because the function imodwt looks for the names created by the modwt function. If you need to change names, do it AFTER the reconstruction. I hope that it helps you. Rogerio ---------- Cabe?alho original ----------- De: "Airon Yiu" aironyiu at yahoo.com.hk Para: "rdporto1" rdporto1 at terra.com.br C?pia: "r-help" r-help at stat.math.ethz.ch Data: Wed, 15 Nov 2006 23:49:57 +0800 (CST) Assunto: ??: Re:??: Re:[R] Need help in waveslim package: imodwt and universal.thresh.modwt> Hi Rogerio: > > Here is what I tried. I have used only data points 1 to 1447 but the same problems appear if I used all the data in the file I sent . > > >library(waveslim) > >infile <-"C:\\airon.csv" > >ckhdat <- read.csv(infile,header=TRUE, quote="") > ... > 1464 23-Dec-05,80.8,81,80.7,80.95,1538304,80.95 > 1465 28-Dec-05,80.85,81,80.3,80.7,3728116,80.7 > 1466 29-Dec-05,80.8,80.95,80.3,80.4,3145493,80.4 > 1467 30-Dec-05,80.4,80.2,78.85,79.65,7508611,79.65 > >xdata <- ckhdata$adjcls[1:1447] > > ckhdwt.la8 <- modwt(xdata, "la8", n.levels = 6) > > names(ckhdwt.la8) <- c("w1", "w2", "w3", "w4", "w5","w6", "v6") > > > > ydata <- imodwt(ckhdwt.la8) > > ydata > numeric(0) > > thre_wc_univ <- universal.thresh.modwt(ckhdwt.la8, max.level = 4, hard = FALSE) > ???abs(wc.fine) : ?????????? > > > > Note that the error message for universal.thresh.modwt is in Chinese. It roughly means "Error at abs(wc.find) : variable cannot have non-numeric value" > > I need to find an WinXP (English) machine to see if the same issue appers. > > Thks
Airon Yiu
2006-Nov-16 04:28 UTC
[R] 回覆: Re:??: Re:??: Re: Need help in waveslim package: imodwt and universal.thresh.modwt
Hi Rogerio: Thks a lot. It works. By the way, I have 2 related sides issues that need some help: (1) What I want to do is this - do modwt on original time series - do thresholding on wavelet coefficients - obtain the inversed smoothed and detailed components of the original time series using the thesholded coefficients. How can this be done ? mra accept the original time series as input. imodwt rountine will give me the inversed transformed in the form of original time series, instead of separating them into detailed and smoothed component. (2) Is there a way to make R giving me error messages in English instead of Chinese so that I can communicate with others easily Thks rdporto1 <rdporto1@terra.com.br> »¡¡G Airon, I don't think you have to find an English computer 'cause the following must work in your Chinese one :-) Let me explain. First of all, change your lines to xdata <- ckhdat$Adj..Close[1:1447] #names(ckhdwt.la8) <- c("w1", "w2", "w3", "w4", "w5","w6", "v6") note the # sign, i.e., DO NOT change the names before the function imodwt. This is because the function imodwt looks for the names created by the modwt function. If you need to change names, do it AFTER the reconstruction. I hope that it helps you. Rogerio ---------- Cabeçalho original ----------- De: "Airon Yiu" aironyiu@yahoo.com.hk Para: "rdporto1" rdporto1@terra.com.br Cópia: "r-help" r-help@stat.math.ethz.ch Data: Wed, 15 Nov 2006 23:49:57 +0800 (CST) Assunto: ??: Re:??: Re:[R] Need help in waveslim package: imodwt and universal.thresh.modwt> Hi Rogerio: > > Here is what I tried. I have used only data points 1 to 1447 but the same problems appear if I used all the data in the file I sent . > > >library(waveslim) > >infile <-"C:\\airon.csv" > >ckhdat <- read.csv(infile,header=TRUE, quote="") > ... > 1464 23-Dec-05,80.8,81,80.7,80.95,1538304,80.95 > 1465 28-Dec-05,80.85,81,80.3,80.7,3728116,80.7 > 1466 29-Dec-05,80.8,80.95,80.3,80.4,3145493,80.4 > 1467 30-Dec-05,80.4,80.2,78.85,79.65,7508611,79.65 > >xdata <- ckhdata$adjcls[1:1447] > > ckhdwt.la8 <- modwt(xdata, "la8", n.levels = 6) > > names(ckhdwt.la8) <- c("w1", "w2", "w3", "w4", "w5","w6", "v6") > > > > ydata <- imodwt(ckhdwt.la8) > > ydata > numeric(0) > > thre_wc_univ <- universal.thresh.modwt(ckhdwt.la8, max.level = 4, hard = FALSE) > ???abs(wc.fine) : ?????????? > > > > Note that the error message for universal.thresh.modwt is in Chinese. It roughly means "Error at abs(wc.find) : variable cannot have non-numeric value" > > I need to find an WinXP (English) machine to see if the same issue appers. > > Thks_______________________________________ YM - Â÷½u°T®§ ´Nºâ§A¨S¦³¤Wºô¡A§AªºªB¤Í¤´¥i¥H¯d¤U°T®§µ¹§A¡A·í§A¤Wºô®É´N¯à¥ß§Y¬Ý¨ì¡A¥ô¦ó»¡¸Ü³£ÉN¨«¥¢¡C [[alternative HTML version deleted]]
Prof Brian Ripley
2006-Nov-16 07:22 UTC
[R] 回覆: Re:??: Re:??: Re: Need help in waveslim package: imodwt and universal.thresh.modwt
On Thu, 16 Nov 2006, Airon Yiu wrote:> Hi Rogerio: > > Thks a lot. It works. > > By the way, I have 2 related sides issues that need some help: > (1) What I want to do is this > - do modwt on original time series > - do thresholding on wavelet coefficients > - obtain the inversed smoothed and detailed components of the original time series using the thesholded coefficients. How can this be done ? > > mra accept the original time series as input. > imodwt rountine will give me the inversed transformed in the form of original time series, instead of separating them into detailed and smoothed component. > > (2) Is there a way to make R giving me error messages in English > instead of Chinese so that I can communicate with others easilyYes, and it is described in the rw-FAQ and in the R-admin manual. You need to set LANGUAGE=en, where exactly depending on your unstated OS. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Reasonably Related Threads
- ??: Re: Need help in waveslim package: imodwt and universal.thresh.modwt
- Need help in waveslim package: imodwt and universal.thresh.modwt
- ??: Re:??: Re:??: Re: Need help in waveslim package: imodwt and universal.thresh.modwt
- Filters in waveslim
- Error in xy.coords(x, NULL, log = log) : (list) object cannot be coerced to type 'double'