[R] bootpred for multinomial

From: azam jaafari <azamjaafari_at_yahoo.com>
Date: Wed, 09 Jun 2010 06:15:11 -0700 (PDT)


Thank you very much
 
I used bootpred for multinomial logistic reg. similar below: theta.fit <- function(x,y){lsfit(x,y)}

   theta.predict <- function(fit,x){
               cbind(1,x)%*%fit$coef         
               }    
   sq.err <- function(y,yhat) { (y-yhat)^2}                   
   results <- bootpred(x,y,20,theta.fit,theta.predict,
     err.meas=sq.err)  

x=data
mlr=multinom(y~x1+x2+x3+x4+x5, data)
 
after run results:

> results <- bootpred(data, mlr,50,theta.fit,theta.predict, sq.err)              
Error in as.vector(data) :
  no method for coercing this S4 class to a vector  
Is it incorrect?
 
Azam

 
 
 
 


From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de> Subject: Re: [R] bootpred for multinomial To: "azam jaafari" <azamjaafari_at_yahoo.com> Cc: "R-help" <r-help_at_r-project.org>
Date: Wednesday, June 9, 2010, 5:46 AM

On 09.06.2010 13:26, azam jaafari wrote:
> I applied bootpred for multinomial logistic reg. (with nnet package). I used same as theta.fit and theta.predict of R for my data. but give me error. Can I do this with
> response vriable;7 levels
> predictor variables:5 (1 classifier, 4 continuous)?

>

> Thanks alot
> Azam
>
>
>
>

>     [[alternative HTML version deleted]]
>
>
>
>

> ______________________________________________
> R-help_at_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.

Yes, PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

otherwise it is hard to help without your code and without any error message.

Uwe Ligges

      
	[[alternative HTML version deleted]]


______________________________________________

R-help_at_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. Received on Wed 09 Jun 2010 - 13:17:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Jun 2010 - 14:40:28 GMT.

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

list of date sections of archive