Re:multiple linear regression
- To: mathgroup at smc.vnet.net
- Subject: [mg15843] Re:[mg15751] multiple linear regression
- From: "Tomas Garza" <tgarza at mail.internet.com.mx>
- Date: Fri, 12 Feb 1999 18:40:03 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Jeff D. Hamann wrote: >I can't figure out how to do multiple linear regreesion from dat that is >read in from a file..... >for example >data=ReadList["h:\st552\hw4\watershd.dta", Number, RecordLists->True] >where the file has ten columns of data and i want to fit columns 2,3, >and 6 on column 7. >and performing 3-d list plots? Jeff, First,load Statistics` and Graphics`. Choose the columns you want to use: reducedData=Transpose[Extract[Transpose[data],{{2},{3},{6},{7}}]] and then run the regression, e.g., Regress[reducedData,{1,x,y,z},{x,y,z}] You may plot any two of the independent variables together with the response variable using ScatterPlot3D or ListSurfacePlot3D from the Graphics` AddOn. Good luck, Tomas Garza Mexico City