Hi Jeremy,

newData<-data.frame(JVeg5=factor(Jdata[,"JVeg5"]),scale(Jdata[,c("Elevation","Lat_Y_pos","Coast_dist","Stream_dist")]))
Global <- polr(JVeg5 ~  Elevation +  Lat_Y_pos + Coast_dist + Stream_dist,
		data=newData, na.action = na.omit, Hess = TRUE)

summary(Global)

Does this still do what you want? At least it doesn't produce the error like this.

greetings Jessi


On 09.07.2012, at 11:55, Jeremy Little wrote:

> Hello,
> 
> I am trying to run an ordinal logistic regression (polr) using the package
> 'MASS'.
> 
> I have successfully run other regression classes (glm, multinom) without
> much problem, but with the 'polr' class I get the following error:
> " Error in svd(X) : infinite or missing values in 'x' "
> which appears when I run the "summary" command.
> 
> The data file is large (585000 rows) and has no NA, -9999 or blank values.
> 
> My script (in brief) is as follows, with results:
> 
> ############
>> library(MASS)
>> 
>> ## ADD DATA
>> Jdata<- read.delim("/Analysis/20120709 JLittle data file.txt", header=T)
>> 
>> attach(Jdata)
>> names(Jdata)
> [1] "POINTID"     "Lat_Y_pos"   "JVeg5"       "Subregion"   "Rock_U_Nam" 
> "Rock_Name"   "Elevation"   "Slope"       "Aspect"      "Hillshade"  
> "Stream_dist" "Coast_dist"  "Coast_SE"   
> [14] "Coast_E"     "Wind_310"    "TPI"         "Landform"   
>> 
>> Global <- polr(JVeg5 ~  Elevation +  Lat_Y_pos + Coast_dist + Stream_dist,
>> data=Jdata)
>> 
>> summary(Global)
> Error in svd(X) : infinite or missing values in 'x'
>> 
> ##Try with omit NA command
>> Global <- polr(JVeg5 ~  Elevation +  Lat_Y_pos + Coast_dist + Stream_dist,
>> data=Jdata, na.action = na.omit, Hess = TRUE)
>> 
>> summary(Global)
> Error in svd(X) : infinite or missing values in 'x'
> ############
> 
> Does this imply an 'infinite value' and what would this mean?
> 
> If anyone has any idea how to address this error, I would very much
> appreciate your response.
> 
> Thank you in advance.
> 
> Jeremy
> 
> Date File Attachment (200 rows):
> http://r.789695.n4.nabble.com/file/n4635829/20120709_JLittle_data_file.txt
> 20120709_JLittle_data_file.txt 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Package-MASS-polr-Error-in-svd-X-infinite-or-missing-values-in-x-tp4635829.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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.


	[[alternative HTML version deleted]]

