[R] KhmaladzeTest

From: raul sanchez <r_o_sanchez2003_at_yahoo.com.ar>
Date: Sat 08 Jul 2006 - 10:39:13 EST


Hello. I am a beginer in R and I can not implement the KhmaladzeTest in the following command. Please help me!!!!!!!!!!!   PD: I attach thw results and the messages of the R program    

  R : Copyright 2006, The R Foundation for Statistical Computing Version 2.3.1 (2006-06-01)
ISBN 3-900051-07-0 R es un software libre y viene sin GARANTIA ALGUNA. Usted puede redistribuirlo bajo ciertas circunstancias. Escriba 'license()' o 'licence()' para detalles de distribucion.

R es un proyecto colaborativo con muchos contribuyentes. Escriba 'contributors()' para obtener mas informacion y 'citation()' para saber como citar R o paquetes de R en publicaciones.

Escriba 'demo()' para demostraciones, 'help()' para el sistema on-line de ayuda,
o 'help.start()' para abrir el sistema de ayuda HTML con su navegador. Escriba 'q()' para salir de R.

> utils:::menuInstallLocal()

package 'quantreg' successfully unpacked and MD5 sums checked updating HTML package descriptions
> utils:::menuInstallLocal()

package 'foreign' successfully unpacked and MD5 sums checked updating HTML package descriptions
> utils:::menuInstallLocal()

package 'Rcmdr' successfully unpacked and MD5 sums checked updating HTML package descriptions
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)}) quantreg package loaded: To cite see citation("quantreg")
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)}) Loading required package: tcltk
Loading Tcl/Tk interface ... done
--- Please select a CRAN mirror for use in this session --- also installing the dependencies 'acepack', 'scatterplot3d', 'fBasics',

'Hmisc', 'quadprog', 'oz', 'mlbench', 'randomForest', 'SparseM', 
'xtable', 'chron', 'fCalendar', 'its', 'tseries', 'DAAG', 'e1071', 'mvtnorm', 
'zoo', 'strucchange', 'sandwich', 'dynlm', 'leaps'

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/acepack_1.3-2.2.zip' Content
type 'application/zip' length 55667 bytes URL abierta
downloaded 54Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/scatterplot3d_0.3-24.zip' Content
type 'application/zip' length 540318 bytes URL abierta
downloaded 527Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/fBasics_221.10065.zip' Content
type 'application/zip' length 3327499 bytes URL abierta
downloaded 3249Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/Hmisc_3.0-12.zip' Content
type 'application/zip' length 1993038 bytes URL abierta
downloaded 1946Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/quadprog_1.4-8.zip' Content
type 'application/zip' length 38626 bytes URL abierta
downloaded 37Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/oz_1.0-13.zip' Content
type 'application/zip' length 39640 bytes URL abierta
downloaded 38Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/mlbench_1.1-1.zip' Content
type 'application/zip' length 1324913 bytes URL abierta
downloaded 1293Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/randomForest_4.5-16.zip' Content
type 'application/zip' length 209710 bytes URL abierta
downloaded 204Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/SparseM_0.68.zip' Content
type 'application/zip' length 728594 bytes URL abierta
downloaded 711Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/xtable_1.3-2.zip' Content
type 'application/zip' length 56703 bytes URL abierta
downloaded 55Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/chron_2.3-4.zip' Content
type 'application/zip' length 101287 bytes URL abierta
downloaded 98Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/fCalendar_221.10065.zip' Content
type 'application/zip' length 754551 bytes URL abierta
downloaded 736Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/its_1.1.1.zip' Content
type 'application/zip' length 194287 bytes URL abierta
downloaded 189Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/tseries_0.10-3.zip' Content
type 'application/zip' length 392748 bytes URL abierta
downloaded 383Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/DAAG_0.79.zip' Content
type 'application/zip' length 796328 bytes URL abierta
downloaded 777Kb

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/e1071_1.5-13.zip' Content
type 'application/zip' length 627972 bytes URL abierta

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/mvtnorm_0.7-2.zip' Content
type 'application/zip' length 214609 bytes URL abierta

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/zoo_1.1-0.zip' Content
type 'application/zip' length 695387 bytes URL abierta

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/strucchange_1.2-13.zip' Content
type 'application/zip' length 866668 bytes URL abierta

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/sandwich_1.9-0.zip' Content
type 'application/zip' length 675607 bytes URL abierta

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/dynlm_0.1-2.zip' Content
type 'application/zip' length 43966 bytes URL abierta

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/leaps_2.7.zip' Content
type 'application/zip' length 73301 bytes URL abierta

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/relimp_0.9-6.zip' Content
type 'application/zip' length 70677 bytes URL abierta

probando la URL
'http://cran.au.r-project.org/bin/windows/contrib/2.3/multcomp_0.4-8.zip' Content
type 'application/zip' length 310081 bytes URL abierta

Versión del Rcmdr 1.1-7
> Datos <- read.dta("C:/Mis documentos/r1-r1.dta", convert.dates=TRUE,
convert.factors=TRUE, missing.type=TRUE, convert.underscore=TRUE, warn.missing.labels=TRUE)
Aviso en read.dta("C:/Mis documentos/r1-r1.dta", convert.dates = TRUE, :

         'missing.type' only applicable to version 8 files
> fit1 <- rq(yyy ~ lll, tau = 0.5, data = Datos)
> fit1

Call:
rq(formula = yyy ~ lll, tau = 0.5, data = Datos)

Coefficients:
(Intercept) lll

   4.249606 -0.929411

Degrees of freedom: 36 total; 34 residual
> summary(fit1)

Call: rq(formula = yyy ~ lll, tau = 0.5, data = Datos)

tau: [1] 0.5

Coefficients:

            coefficients lower bd upper bd
(Intercept)  4.24961      2.36774  4.95617
lll         -0.92941     -1.08243 -0.52124

> r1 <- resid(fit1)
> c1 <- coef(fit1)
> summary(fit1, se = "nid")

Call: rq(formula = yyy ~ lll, tau = 0.5, data = Datos)

tau: [1] 0.5

Coefficients:

            Value Std. Error t value Pr(>|t|) (Intercept) 4.24961 1.05525 4.02710 0.00046 lll -0.92941 0.22934 -4.05246 0.00043
> fit <- rqProcess( y.net ~ lgdp2 + fse2 + gedy2 + Iy2 + gcony2,

+                 data = barro, taus = seq(.1,.9,by = .05))
Erro en inherits(x, "data.frame") : objeto "barro" no encontrado
> fit <- rqProcess(yyy ~ lll, data = Datos, taus = seq(.1,.9, by =
.05))
taus: 0.1 Erro en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

        tau - h < 0: error in summary.rq
> f <- rqProcess(yyy ~ lll, data = Datos, taus = seq(.1,.9, by = .05))
taus: 0.1 Erro en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

        tau - h < 0: error in summary.rq
> fit1 <- rqProcess(yyy ~ lll, data = Datos, taus = seq(.1,.9, by =
.05))
taus: 0.1 Erro en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

        tau - h < 0: error in summary.rq
> T1 <- KhmaladzeTest(yyy ~ lll, taus = -1, nullH = "location")
Erro en eval(expr, envir, enclos) : objeto "yyy" no encontrado
> Datos <- read.dta("C:/Mis documentos/r1-r1.dta", convert.dates=TRUE,
convert.factors=TRUE, missing.type=TRUE, convert.underscore=TRUE, warn.missing.labels=TRUE)
Aviso en read.dta("C:/Mis documentos/r1-r1.dta", convert.dates = TRUE, :

         'missing.type' only applicable to version 8 files
> T1 <- KhmaladzeTest(yyy ~ lll, taus = -1, nullH = "location")
Erro en eval(expr, envir, enclos) : objeto "yyy" no encontrado
> T1 <- KhmaladzeTest( yyy ~ lll, taus = -1, nullH = "location")
Erro en eval(expr, envir, enclos) : objeto "yyy" no encontrado
> data(barro)
> invisible(edit(barro))
> rqProcess(yyy ~ lll, data = Datos, taus = -1, nullH = "location")
$taus
[1] 0.3161186 0.3543310 0.4007676 0.4150787 0.4268406 0.4542215 0.5008570 0.5304535 0.5690997
[10] 0.6206522 0.6522563

$qtaus
[1] -0.037757189 -0.033227447 -0.032656681 -0.016152701 -0.015090004 -0.014413058
[7] -0.013738239 -0.013471008 -0.012253429 -0.010675005 -0.009866834

$Vhat

          [,1]      [,2]      [,3]       [,4]       [,5]       [,6]       
[,7]       [,8]

[1,] 0.3064789 0.5104205 0.6209815 -0.0850221 -0.2053440 -0.1631580 -0.1766553 -0.1768334

           [,9] [,10] [,11]
[1,] -0.1483747 -0.1191922 -0.1026903

$vhat

          [,1]      [,2]      [,3]       [,4]       [,5]       [,6]       
[,7]       [,8]

[1,] 0.3064789 0.5104205 0.6209815 -0.0850221 -0.2053440 -0.1631580 -0.1766553 -0.1768334

           [,9] [,10] [,11]
[1,] -0.1483747 -0.1191922 -0.1026903

attr(,"class")
[1] "rqProcess"
> rqProcess(yyy ~ lll, data = Datos,taus = seq(.1,.9, by = .05), nullH
= "location")
taus: 0.1 Erro en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

        tau - h < 0: error in summary.rq
> KhmaladzeTest( yyy ~ lll, data = Datos, taus = seq(.1,.9, by = .05))
taus: 0.1 Erro en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

        tau - h < 0: error in summary.rq
> T1 <- KhmaladzeTest(yyy ~ lll, taus = -1, nullH = "location")
Erro en eval(expr, envir, enclos) : objeto "yyy" no encontrado
> fit1 <- rqProcess(yyy ~ lll, data = Datos, taus = seq(.1,.9, by =
.05))
taus: 0.1 Erro en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

        tau - h < 0: error in summary.rq
> KhmaladzeTest( yyy ~ lll, data = Datos, taus = -1)
Erro en qr(X[1:p, ]) : NA/NaN/Inf en llamada a una función externa (arg 1)
> KhmaladzeTest( yyy ~ lll, data = Datos, taus = -1, nullH =
"location")
Erro en qr(X[1:p, ]) : NA/NaN/Inf en llamada a una función externa (arg 1)
> data(barro)
> KhmaladzeTest( y.net ~ lgdp2 + fse2 + gedy2 + Iy2 + gcony2,
+ data = barro, taus = seq(.05,.95,by = .01)) taus: 0.05 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.06 0.07 0.08 0.09 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.1 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.11 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         2 non-positive fis
0.12 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         3 non-positive fis
0.13 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         3 non-positive fis
0.14 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         4 non-positive fis
0.15 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         3 non-positive fis
0.16 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         5 non-positive fis
0.17 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         4 non-positive fis
0.18 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         5 non-positive fis
0.19 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         4 non-positive fis
0.2 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         4 non-positive fis
0.21 0.22 0.23 0.24 0.25 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.26 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.27 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.28 0.29 0.3 0.31 0.32 0.33 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.58 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         2 non-positive fis
0.59 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.6 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.61 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.62 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.63 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.64 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.65 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.66 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.67 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.68 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.69 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         2 non-positive fis
0.7 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         2 non-positive fis
0.71 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         2 non-positive fis
0.72 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.73 0.74 0.75 0.76 0.77 0.78 0.79 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         2 non-positive fis
0.8 0.81 0.82 0.83 0.84 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         2 non-positive fis
0.85 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         3 non-positive fis
0.86 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         3 non-positive fis
0.87 0.88 0.89 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         1 non-positive fis
0.9 0.91 0.92 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         2 non-positive fis
0.93 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         9 non-positive fis
0.94 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         13 non-positive fis
0.95 Aviso en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

         14 non-positive fis
$nullH
[1] "location"

$Tn
[1] 6.029988

$THn

    lgdp2 fse2 gedy2 Iy2 gcony2 1.3198411 1.1505847 1.2480321 0.8466474 1.0036528

attr(,"class")
[1] "KhmaladzeTest"
> data(Datos)

Aviso en data(Datos) : data set 'Datos' not found
> Datos <- read.dta("C:/Mis documentos/r1-r1.dta", convert.dates=TRUE,
convert.factors=TRUE, missing.type=TRUE, convert.underscore=TRUE, warn.missing.labels=TRUE)
Aviso en read.dta("C:/Mis documentos/r1-r1.dta", convert.dates = TRUE, :

         'missing.type' only applicable to version 8 files
> data(Datos)

Aviso en data(Datos) : data set 'Datos' not found
> Datos <- read.dta("C:/Mis documentos/r1-r1.dta", convert.dates=TRUE,
convert.factors=TRUE, missing.type=TRUE, convert.underscore=TRUE, warn.missing.labels=TRUE)
Aviso en read.dta("C:/Mis documentos/r1-r1.dta", convert.dates = TRUE, :

         'missing.type' only applicable to version 8 files
> KhmaladzeTest( yyy ~ lll, data = Datos, taus = -1, nullH =
"location")
Erro en qr(X[1:p, ]) : NA/NaN/Inf en llamada a una función externa (arg 1)
> invisible(edit(Datos))
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
> fit <- rqProcess( yyy ~ lll, data = Datos, taus = seq(.1,.9,by =
.05))

> fff <- rqProcess( yyy ~ lll, data = Datos, taus = seq(.1,.9,by =
.05))
taus: 0.1 Erro en summary.rq(rq(formula, data = data, tau = taus[i], method = "fn"), :

        tau - h < 0: error in summary.rq
> fff <- rqProcess(yyy ~ lll, data = Datos, taus = -1, nullH =
"location")
> khmaladze.test(fit, nullH = "location")

Error: no se pudo encontrar la función "khmaladze.test"

> khmaladze.test(fff, nullH = "location")
Error: no se pudo encontrar la función "khmaladze.test"

> Khmaladze.test(fff, nullH = "location")
Error: no se pudo encontrar la función "Khmaladze.test"
> KhmaladzeTest(fff, nullH = "location")
Erro en terms.default(formula, data = data) :

        no terms component
> KhmaladzeTest(fff,data = Datos)

Erro en terms.default(formula, data = data) :

        no terms component
> KhmaladzeTest(fff, data = Datos)

Erro en terms.default(formula, data = data) :

        no terms component
> KhmaladzeTest(fff, data = Datos, nullH = "location")
Erro en terms.default(formula, data = data) :

        no terms component
> khmaladze.test(fit, nullH = "location")
Error: no se pudo encontrar la función "khmaladze.test"
> KhmaladzeTest(fff, data = Datos, taus = -1, nullH = "location")
Erro en terms.default(formula, data = data) :

        no terms component
> help.search("KhmaladzeTest")
> KhmaladzeTest( yyy ~ lll, data = Datos, taus = -1, nullH =
"location" , trim = c(0.05, 0.95))
Erro en qr(X[1:p, ]) : NA/NaN/Inf en llamada a una función externa (arg 1)
> KhmaladzeTest( fff, data = Datos, taus = -1, nullH = "location" ,
trim = c(0.05, 0.95))
Erro en terms.default(formula, data = data) :

        no terms component
> ls()

[1] "barro" "c1" "Datos" "fff" "fit1" "GLM.1" "r1"
> summary(fff)

      Length Class  Mode   
taus  11     -none- numeric
qtaus 11     -none- numeric
Vhat  11     -none- numeric
vhat  11     -none- numeric

> KhmaladzeTest(formula, data = NUL, taus = -1, nullH = "location"

+ >
> KhmaladzeTest(fff, data = Datos, taus = -1, nullH = "location")
Erro en terms.default(formula, data = data) :

        no terms component
> KhmaladzeTest(fff, data = Datos)

Erro en terms.default(formula, data = data) :

        no terms component
> KhmaladzeTest( fff, data = Datos, taus = -1, nullH = "location" ,
trim = c(0.05, 0.95))
Erro en terms.default(formula, data = data) :

        no terms component
> KhmaladzeTest( fit1, data = Datos, taus = -1, nullH = "location" ,
trim = c(0.05, 0.95))
Erro en qr(X[1:p, ]) : NA/NaN/Inf en llamada a una función externa (arg 1)
> fix(Datos)
                 



 1GB gratis, Antivirus y Antispam
 Correo Yahoo!, el mejor correo web del mundo  Abrí tu cuenta aquí



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jul 08 10:49:24 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 09 Jul 2006 - 02:16:15 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.