Usuari:Lixiaoxu
szpku.lixiaoxu@gmail.com
- Regression
<Rform name="owndata">
Enter your own data for a scatterplot:
You can use <a href="https://spreadsheets.google.com/ccc?key=0Aic4pmEZm32xclhJZm9hNWFyZlZOV1RSV19xWXRlbmc&hl=en">the free online spreadsheet </a> of Google Docs to edit your data before pasting. Just click the link, need NO login.
<textarea name="mydata" rows="8">
1.262954285 3.8739569
-0.326233361 1.0400041
1.329799263 2.0161824
1.272429321 2.8284819
0.414641434 2.1324980
-1.539950042 0.4565291
-0.928567035 1.6093698
-0.294720447 0.9723025
-0.005767173 2.5310696
2.404653389 2.7861843
</textarea>
<input type="submit" value=" Submit ">
</Rform>
<R output="display" name="owndata" iframe="height:500px;"> if (exists("mydata")) {
main <- "Data from user" x <- readdataSK(mydata, format="txt")
} else {
main <- "Default data" set.seed(0); x<-matrix(rnorm(20),10,2); x[,2]=2.1+x[,1]*.8+x[,2]; colnames(x)<-c('V1','V2');
}
pdf(rpdf, width=6, height=6) lm.m<-lm(x[,2]~x[,1]); main<-paste(main,'\nV2 =',round(lm.m$coefficients[1],3),'+',round(lm.m$coefficients[2],3),'*V1 + ',round(summary(lm.m)$sigma,3),'*e') plot(x, cex=2, main=main) abline(lm.m)
</R>