Computed theoretical power for N=100 and N=200 scenarios
This commit is contained in:
29
Modules/ado/personal/t/tosas.ado
Normal file
29
Modules/ado/personal/t/tosas.ado
Normal file
@ -0,0 +1,29 @@
|
||||
program define tosas,eclass
|
||||
version 10.0
|
||||
syntax [varlist] [if] [in] [,Name(string) pgm(string) Batch]
|
||||
preserve
|
||||
if "`if'"!=""|"`in'"!="" {
|
||||
qui keep `if' `in'
|
||||
}
|
||||
local dir=c(tmpdir)
|
||||
tempfile tosasfile totsasfile
|
||||
qui outsheet `varlist' using "`tosasfile'.txt",replace
|
||||
qui outsheet `varlist' using "d:\essai.txt",replace
|
||||
if "`name'"=="" {
|
||||
local name stata
|
||||
}
|
||||
drop _all
|
||||
qui set obs 1000
|
||||
qui gen txt=""
|
||||
qui replace txt="PROC IMPORT OUT=WORK.`name' DATAFILE='`tosasfile'.txt' DBMS=TAB REPLACE;GETNAMES=YES;DATAROW=2; RUN;" in 3
|
||||
qui replace txt="`pgm'" in 4
|
||||
qui outsheet txt using "`tosasfile'_pgmsas.txt", replace nonames noquote
|
||||
if "`batch'"!="" {
|
||||
shell "C:\Program Files\SAS\SASFoundation\9.3\sas.exe" "`tosasfile'_pgmsas.txt" -print "`tosasfile'.lst" -nolog
|
||||
view "`tosasfile'.lst"
|
||||
}
|
||||
else {
|
||||
shell "C:\Program Files\SASHome\SASFoundation\9.3\core\sasexe\SASOACT.EXE" action=Submit datatype=SASFile filename="`tosasfile'_pgmsas.txt" progid=SAS.Application.903
|
||||
}
|
||||
restore
|
||||
end
|
Reference in New Issue
Block a user