R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > y <- c(13,10,12,16,11,16,5,10,10,4,13,16,16,15,10,14,15,14,12,13,12,12,16,8,11,9,10,18,15,13,10,13,13,16,12,13,10,10,12,13,11,4,15,12,11,13,13,13,12,15,16,16,15,10,16,12,16,16,10,11,13,12,14,11,12,14,15,10,10,13,15,11,12,12,11,10,10,13,7,13,10,12,15,11,12,6,12,7,10,17,11,11,12,10,5,11,11,10,13,5,10,12,11,11,11,10,10,8,7,14,9,9,7,11,14,10,10,13,10,8,11,11,10,13) > x <- c(8,15,14,12,12,17,10,5,13,17,16,11,10,13,6,8,10,8,16,12,14,8,13,6,11,5,11,11,9,5,9,12,13,14,10,12,10,8,17,16,10,11,12,10,13,17,6,10,11,13,16,9,13,9,14,12,17,13,2,17,8,10,8,10,13,15,11,11,8,14,15,4,14,11,12,6,15,12,15,17,10,12,13,16,14,1,18,6,16,13,5,8,12,6,11,16,17,12,13,11,8,14,7,14,14,13,10,9,2,12,11,15,15,7,12,13,12,17,12,15,15,11,10,15) > ylab = 'recht en ondernemen' > xlab = 'PC toepassingen' > main = 'Simple Linear Regression' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: > #Technical description: > m <- lm(y ~ x) > sm <- summary(m) > postscript(file="/var/www/html/rcomp/tmp/1cx7x1290969455.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > myscatter<-plot(x,y,main=main,xlab=xlab,ylab=ylab) > abline(m) > grid() > dev.off() null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Y = alpha + beta X',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Intercept (alpha)',header=TRUE) > a<-table.element(a,round(m$coef[[1]],4)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Slope (beta)',header=TRUE) > a<-table.element(a,round(m$coef[[2]],4)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'S.D. (beta)',header=TRUE) > a<-table.element(a,round(sm$coef[2,2],4)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'T-Stat (beta)',header=TRUE) > a<-table.element(a,round(sm$coef[2,3],4)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'P-Value (beta)',header=TRUE) > a<-table.element(a,round(sm$coef[2,4],4)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Correlation',header=TRUE) > a<-table.element(a,round(sqrt(sm$r.sq),4)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'R-squared',header=TRUE) > a<-table.element(a,round(sm$r.sq,4)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/2jzm91290969455.tab") > > try(system("convert tmp/1cx7x1290969455.ps tmp/1cx7x1290969455.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.386 0.175 0.791