regarding QRb() function

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

regarding QRb() function

narendarreddy kalam
Error in `[.data.frame`(x, order(x, na.last = na.last, decreasing = decreasing)) :    undefined columns selected during the execution of following r sequence of commands
X<-subset(data,select=c(V1,V2,V3,V4,V5,V6,V7,V8,V9))
y<-subset(data,selcet=10)
Data = list(y=y, X=X, p=.75)
Prior = list(betabar=c(rep(0,ncol(X))),A=.01*diag(ncol(X)))
Mcmc = list(R=100000, keep=10, step=.2)
out <- QRb(Data=Data, Prior=Prior, Mcmc=Mcmc)

here data is of 60 records and 10 attributes. V1,...V9 are input values and V10 is response variable.
Reply | Threaded
Open this post in threaded view
|

Re: regarding QRb() function

Uwe Ligges-3


On 26.12.2011 15:30, narendarreddy kalam wrote:
> Error in `[.data.frame`(x, order(x, na.last = na.last, decreasing =
> decreasing)) :    undefined columns selected during the execution of
> following r sequence of commands
> X<-subset(data,select=c(V1,V2,V3,V4,V5,V6,V7,V8,V9))
> y<-subset(data,selcet=10)
> Data = list(y=y, X=X, p=.75)
> Prior = list(betabar=c(rep(0,ncol(X))),A=.01*diag(ncol(X)))
> Mcmc = list(R=100000, keep=10, step=.2)
> out<- QRb(Data=Data, Prior=Prior, Mcmc=Mcmc)


1. We do not have the object "data".
2.

 > QRb
Error: object 'QRb' not found

Please read the very last sentence of each R-help message.

Uwe Ligges








> here data is of 60 records and 10 attributes. V1,...V9 are input values and
> V10 is response variable.
>
> --
> View this message in context: http://r.789695.n4.nabble.com/regarding-QRb-function-tp4234816p4234816.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: regarding QRb() function

Douglas Bates-2
2011/12/28 Uwe Ligges <[hidden email]>:

>
>
> On 26.12.2011 15:30, narendarreddy kalam wrote:
>>
>> Error in `[.data.frame`(x, order(x, na.last = na.last, decreasing =
>> decreasing)) :    undefined columns selected during the execution of
>> following r sequence of commands
>> X<-subset(data,select=c(V1,V2,V3,V4,V5,V6,V7,V8,V9))
>> y<-subset(data,selcet=10)
>> Data = list(y=y, X=X, p=.75)
>> Prior = list(betabar=c(rep(0,ncol(X))),A=.01*diag(ncol(X)))
>> Mcmc = list(R=100000, keep=10, step=.2)
>> out<- QRb(Data=Data, Prior=Prior, Mcmc=Mcmc)
>
>
>
> 1. We do not have the object "data".
> 2.
>
>> QRb
> Error: object 'QRb' not found
>
> Please read the very last sentence of each R-help message.

and also spell "select" correctly in

 y <- subset(data,select=10)

or, more simply, specify

X <- data[, -10]
y <- data[, 10]

It is not clear if the function you are using requires X to be a
matrix, like a model matrix, or a data frame.  If it expects a matrix
use

X <- data.matrix(data[, -10])


>> here data is of 60 records and 10 attributes. V1,...V9 are input values
>> and
>> V10 is response variable.

______________________________________________
[hidden email] 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.