Re: [R] Error in Switch in KhmaladzeTest

2008-10-15 Thread roger koenker

Hey back,

If you had RTFM  you would know that the first argument of the
function KhmaladzeTest was supposed to be a formula, so try:

T <- KhmaladzeTest(Logloss~AS+AM+CB+CF+RB+RBR, data=CPBP,  
nullH="location")



url:www.econ.uiuc.edu/~rogerRoger Koenker
email[EMAIL PROTECTED]Department of Economics
vox: 217-333-4558University of Illinois
fax:   217-244-6678Champaign, IL 61820



On Oct 15, 2008, at 10:39 AM, [EMAIL PROTECTED] wrote:


Hey,

My dataset has 1 dependent variable(Logloss) and 7 independent dummy
variables(AS,AM,CB,CF,RB,RBR,TS) , it's attached in this email. The  
problem

is I cant finish Khmaladze test because there's an error "Error in
switch(mode(x), "NULL" = structure(NULL, class = "formula"),  :   
invalid
formula" which I really dont know how to fix. My R version is 2.7.2.  
The
packages loaded are "Quantreq" and "Sparse M", the process is as  
follows:



CPBP<-read.table("CPBP.txt")



local({pkg <- select.list(sort(.packages(all.available = TRUE)))

+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
Loading required package: SparseM
Package SparseM (0.78) loaded.  To cite, see citation("SparseM")
Package quantreg (4.22) loaded.  To cite, see citation("quantreg")


fit<-rqProcess(Logloss~AS+AM+CB+CF+RB+RBR,data=CPBP,taus=-1)



KhmaladzeTest(fit,nullH="location")
Error in switch(mode(x), "NULL" = structure(NULL, class =  
"formula"),  :

 invalid formula


I would greatly appreciate if you can help me out, thank you very  
much



(See attached file: CPBP.txt)



Best Regards,

Lulu Ren

-
**
This E-mail is confidential. It may also be legally privileged. If
you are not the addressee you may not copy, forward, disclose or
use any part of it. If you have received this message in error,
please delete it and all copies from your system and notify the
sender immediately by return E-mail.

Internet communications cannot be guaranteed to be timely, secure,
error or virus-free. The sender does not accept liability for any
errors or omissions.
**
SAVE PAPER - THINK BEFORE YOU PRINT! 
__

R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Error in Switch in KhmaladzeTest

2008-10-15 Thread xiaolu . x . ren
Hey,

My dataset has 1 dependent variable(Logloss) and 7 independent dummy
variables(AS,AM,CB,CF,RB,RBR,TS) , it's attached in this email. The problem
is I cant finish Khmaladze test because there's an error "Error in
switch(mode(x), "NULL" = structure(NULL, class = "formula"),  :  invalid
formula" which I really dont know how to fix. My R version is 2.7.2. The
packages loaded are "Quantreq" and "Sparse M", the process is as follows:

 >CPBP<-read.table("CPBP.txt")

> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
Loading required package: SparseM
Package SparseM (0.78) loaded.  To cite, see citation("SparseM")
Package quantreg (4.22) loaded.  To cite, see citation("quantreg")

>  fit<-rqProcess(Logloss~AS+AM+CB+CF+RB+RBR,data=CPBP,taus=-1)

> KhmaladzeTest(fit,nullH="location")
Error in switch(mode(x), "NULL" = structure(NULL, class = "formula"),  :
  invalid formula


I would greatly appreciate if you can help me out, thank you very much


(See attached file: CPBP.txt)



Best Regards,

Lulu Ren

-
**
This E-mail is confidential. It may also be legally privileged. If
you are not the addressee you may not copy, forward, disclose or
use any part of it. If you have received this message in error,
please delete it and all copies from your system and notify the
sender immediately by return E-mail.

Internet communications cannot be guaranteed to be timely, secure,
error or virus-free. The sender does not accept liability for any
errors or omissions.
**
SAVE PAPER - THINK BEFORE YOU PRINT!Logloss AS  AM  CB  CF  RB  RBR TS
1   8.760   0   0   0   1   0   0
2   7.710   0   0   0   1   0   0
3   7.390   0   0   0   1   0   0
4   7.310   0   0   0   1   0   0
5   7.180   0   0   0   1   0   0
6   7.090   0   0   0   1   0   0
7   6.960   0   0   0   1   0   0
8   6.910   0   0   0   1   0   0
9   6.850   0   0   0   1   0   0
10  6.850   0   0   0   1   0   0
11  6.850   0   0   0   1   0   0
12  6.820   0   0   0   1   0   0
13  6.740   0   1   0   0   0   0
14  6.720   0   0   0   1   0   0
15  6.700   0   1   0   0   0   0
16  6.690   0   0   0   1   0   0
17  6.570   0   0   1   0   0   0
18  6.490   1   0   0   0   0   0
19  6.490   0   0   0   1   0   0
20  6.480   0   0   0   1   0   0
21  6.470   0   0   1   0   0   0
22  6.430   0   0   0   0   0   1
23  6.381   0   0   0   0   0   0
24  6.330   0   0   0   1   0   0
25  6.310   0   0   0   1   0   0
26  6.300   0   0   1   0   0   0
27  6.201   0   0   0   0   0   0
28  6.180   0   0   0   1   0   0
29  6.120   0   0   0   1   0   0
30  6.080   0   1   0   0   0   0
31  6.080   0   0   0   0   1   0
32  6.040   0   0   0   1   0   0
33  6.020   0   1   0   0   0   0
34  6.000   0   0   0   1   0   0
35  6.000   0   0   0   1   0   0
36  5.960   0   0   0   1   0   0
37  5.920   0   0   0   1   0   0
38  5.900   0   0   1   0   0   0
39  5.890   0   0   0   0   1   0
40  5.850   0   0   0   1   0   0
41  5.750   0   0   0   1   0   0
42  5.700   0   1   0   0   0   0
43  5.700   0   0   0   1   0   0
44  5.700   0   1   0   0   0   0
45  5.700   0   1   0   0   0   0
46  5.700   0   0   0   0   1   0
47  5.690   0   0   0   1   0   0
48  5.680   1   0   0   0   0   0
49  5.6