Code Snippets Stata

Short texts Stata 🧑‍💻 Code snippets Stata ✍️ Reading lists Stata 👀

spesial.do

*———————————————————————————————————- *Membuat Variabel spesial *———————————————————————————————————- global input “E:\IFLS\DATA\2014\HH” global output “C:\Users\Asus\OneDrive\Desktop\kelas ifls\2. hasil” cd “$output” dir “$input\*” use “$input\bk_ar1.dta”, clear *size family gen inhh=(ar01a==1 | ar01a==2 | ar01a==5 | ar01a==11) keep if inhh==1 keep if ar01i==1 gen member=1 bys hhid14: egen size_family=sum(member) *Education Year sort hhid14_9 pid14 *level= pendidikan tertinggi, grade= kelas tertinggi gen level=ar16 […]

Passing and receiving different SystemVerilog datatypes with C/C++ using DPI

dt: dt_compile dt_csim .PHONY: dt dt_compile dt_csim clean dt_compile: if [ -d work ]; then vdel -lib work -all; fi; vlib work vmap work work vlog -sv -dpiheader dt.h tb_dt_dpi.sv g++ -shared -Bsymbolic -I/home/$(whoami)/modelsim/modeltech/include/ -fPIC -o dt.so dt.cc dt_csim: LD_LIBRARY_PATH=/home/$(whoami)/modelsim/modeltech/lib64/; vsim -64 -c -sv_lib dt -do dt_restart.do -novopt tb_dt_dpi clean: vdel -all #include #include “dt.h” […]

Practice sesion Multinominal dan order logit.do

*======================================================================================================================== Sesi Parktek copyright by sekolah stata *===================================================================================================================== clear set more off capture log close cd “C:\Users\Asus\Downloads\data” use “micro_idn.dta”, clear *usia gen agegrp=age recode agegrp (0/5=1) /// (6/10=2) /// (11/14=3) /// (15/19=4) /// (20/24=5) /// (25/29=6) /// (30/34=7) /// (35/39=8) /// (40/44=9) /// (45/49=10) /// (50/54=11) /// (55/59=12) /// (60/64=13) /// (65/max=14) la def agegrp […]