[R] 回复: high-frequency data in R

2020-11-24 Thread Zixuan Qi
10138 The sample data is here. ��: Zixuan Qi ʱ��: 2020��11��25�� 4:12 �ռ���: r-help@r-project.org : high-frequency data in R Hello, I attach the sample data in the email and you can use the data to try my code. My code is as follow. library

[R] high-frequency data in R

2020-11-24 Thread Zixuan Qi
Hello, I attach the sample data in the email and you can use the data to try my code. My code is as follow. library('highfrequency') library('xts') data=read.table("sample data.csv",header=F,skip = 1,stringsAsFactors=FALSE,sep="\t") colnames(data)=c(" ",'SYMBOL',"PRICE","PERMNO") id <-

[R] highfrequency package-jump test

2020-10-09 Thread Zixuan Qi
Hello, My programming is as follows. library(highfrequency) library(data.table) library(xts) tm<-seq.POSIXt(from = as.POSIXct("2020-08-20 09:30:00"),to = as.POSIXct("2020-08-20 15:59:00"),by='min') data<-xts(x=data$PRICE,order.by=tm) data <- as.data.table(data) setnames(data,c('index'),c('DT'))

[R] A question about nlminb function

2020-07-26 Thread Zixuan Qi
Hi, I use the function nlminb to maximize a function and got convergence with the message false-convergence. I know the reason may be the gradient $B"`(Bf(x) may be computed incorrectly, the other stopping tolerances may be too tight, or either f or $B"`(Bf may be discontinuous near the

[R] A question about optim function in R

2020-07-26 Thread Zixuan Qi
Hi, I encounter a problem in R. My program is as follows. lower <- c(-Inf,-Inf,-Inf,-Inf,0,0,0,-1,-1,-1) upper <- c(Inf,Inf,Inf,Inf,Inf,Inf,Inf,1,1,1) out <- optim(parm,logLik,method='L-BFGS-B',lower=lower,upper=upper,hessian=hessian) As you can see, I have restricted parameter[5], parameter[6]

[R] A Question about MLE in R

2020-07-22 Thread Zixuan Qi
Hi, I encounter a problem. I use optim() function in R to estimate likelihood function and the method is SANN in the optim function. out <- optim(parm,logLik,method='SANN',hessian=T,control=list(maxit=500)) However, I find that each time I run the program, I will get different values of

[R] Logistic regression help!

2014-05-03 Thread Si Qi L.
Hi guys, I have a trouble to solve the specificity and senstitivity for a logistic regression model. I really need your help, would you please help me out? :) Thank you!! This is the model I constructed: model=glm(Status ~ Gender.compl+ X2.4.times.per.month+

[R] About Tree Package

2014-04-28 Thread Si Qi L.
Hi, I will be very grateful if you can give a help on my problem. I am really stuck on it now. The problem is that I need to construct a classification tree model and prune tree in order to test the learning dataset for getting its sensitivity and specificity. But my codes seems wrong somewhere,

[R] sensitivity and specificity

2014-04-25 Thread Si Qi L.
Hi guys, I will be very grateful if you guys can do me a little favor on R. I am calculating the sensitivity and specificity for a 2*2 matrix, such as t 01 0 1427 110 1 271 166 My codes are: sens - function(ct) { ct[2,2] / sum(ct[,2]) } spec -

[R] logistical indexing in R

2014-04-09 Thread Si Qi L.
Dear mates, I am bit of stuck with a coding, all I have to do is to clean and tranform the missing data -97 of the attribute ej into a normal number value in a range from 0 to 22. My steps are : 1) first return the subsets, as check, they do sum to original 2) manipulate the attribute ej

Re: [R] about lm()

2014-03-31 Thread Si Qi L.
Hi, I am very new on R so I will remember to post in plain text next time. Thank you all for your help. I think I can figure it out now~ Many thanks!:) Best regards, Siqi 2014-03-31 11:43 GMT+01:00 Helios de Rosario helios.derosa...@ibv.upv.es: El día 30/03/2014 a las 15:23, Si Qi L

[R] about lm()

2014-03-30 Thread Si Qi L.
Hi I have a problem with linear regression. This is my codes: acc1- lm(data$acc ~ dummy + data$Reqloanamount + data$Code + data$Code.1 + data$EmpNetMonthlyPay + data$Customer_Age + data$RTI) summary(acc1) These attributes are all numerical except the acc(factors), so how can I fix the problem R

[R] dummy coding problem

2014-03-26 Thread Si Qi L.
Hi, I have got a problem with dummy coding and I really couldn't figure it out. Would you please help me out? this is my codes: idx-sort(unique(Employment.time$V1)); dummy - matrix(NA, nrow=nrow(Employment.time), ncol= length(idx)) for (i in 1:nrow(Employment.time)) { for (j in 1:length(idx)) {

[R] How to creat a dummy coding in R? (URGENT!)

2014-03-25 Thread Si Qi L.
Hi, it's so urgent that I really need your help on R. This following is part of my data, do u know how to create a dummy coding about it in R? My control group is Owner occupier. Many thanks for your big help!!!:) *AppHomeStatus* Owner occupier Living with parents Living with parents Private

[R] DUD (Does not Use Derivatives) for nonlinear regression in R?

2013-04-01 Thread qi A
Hi, All SAS has DUD (Does not Use Derivatives)/Secant Method for nonlinear regression, does R offer this option for nonlinear regression? I have read the helpfile for nls() and could not find such option, any suggestion? Thanks, Derek [[alternative HTML version deleted]]

[R] Is DUD available in nls()?

2013-04-01 Thread qi A
SAS has DUD (Does not Use Derivatives)/Secant Method for nonlinear regression, does R offer this option for nonlinear regression? I have read the helpfile for nls() and could not find such option, any suggestion? Thanks, Derek [[alternative HTML version deleted]]

[R] R help

2012-08-08 Thread chong hui qi
Hi I'm trying to increase the memory limit but Im facing this problem Error: unexpected symbol in C:\\Program Files\\R\\R-2.15.0\\bin\\i386\\Rgui.exe --max-mem-size=500M Hope you can help me out Thank You [[alternative HTML version deleted]]

[R] Warning message when Loading package svMisc in R 2.10.0

2009-10-27 Thread Qi Li
Hi, I have a problem when using R 2.10.0, Loading required package: svMisc Warning message: package 'svMisc' was built under R version 2.9.1 and help will not work correctly HOW to fix it? __ R-help@r-project.org mailing list

[R] Tinn-R (Version 2.2.0.2) dose not support R 2.9.0 very well

2009-04-17 Thread LI Qi
Hi£¬ I found that Tinn-R (Version 2.2.0.2) dose not support R 2.9.0 very well. Maybe, somebody who have solved this problem can help me. Thanks for your attention! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list