Sākums > R > Running R from SPSS

Running R from SPSS

Calibration of weights in SPSS using SPSS Statistics-R Plugin 17.0.0 for Win32.

*** SPSS syntax.
begin program r.
library(sampling)
setwd(“C:/Documents and Settings/MLiberts/My Documents/Personal/Iceland_SILC/files”)
cal_var=read.delim(“cal_var.txt”)
cal_tot=read.delim(“cal_tot.txt”)
data=as.matrix(cal_var[,2:ncol(cal_var)])
dw=as.vector(cal_var[,1])
totals=as.vector(cal_tot[,1])
g=calib(data,dw,totals,method=”linear”,description=F)
write.table(g,”g.txt”,row.names=F,col.names=F)
end program.

KategorijasR
  1. Vēl nav komentāru.
  1. No trackbacks yet.

Komentēt

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Mainīt )

Twitter picture

You are commenting using your Twitter account. Log Out / Mainīt )

Facebook photo

You are commenting using your Facebook account. Log Out / Mainīt )

Google+ photo

You are commenting using your Google+ account. Log Out / Mainīt )

Connecting to %s

%d bloggers like this: