text stringlengths 0 538k |
|---|
* train.do
sysuse auto
replace foreign = 3 if _n < 10
replace foreign = 4 if _n > 10 & _n < 20
svmachines foreign price-gear_ratio if !missing(rep78)
do tests/helpers/inspect_model.do
|
* train.do
sysuse auto
replace foreign = 3 if _n < 10
replace foreign = 4 if _n > 10 & _n < 20
svmachines price-gear_ratio if !missing(rep78), type(one_class)
do tests/helpers/inspect_model.do
|
* train_svr.do
sysuse auto
svmachines price mpg-gear_ratio if !missing(rep78), type(nu_svr) kernel(sigmoid)
do tests/helpers/inspect_model.do
|
* predict_svr.do
sysuse auto
capture svmachines price mpg-gear_ratio if !missing(rep78), type(nu_svr) kernel(sigmoid) probability
if(_rc == 0) {
di as error "svmachines should disallow regression with probability turned on"
exit 1
}
|
// there's an off-by-one-ish bug in the new exporting SVs code,
// this code triggers it
sysuse auto
drop make
order gear_ratio
svmachines * if !missing(rep78), sv(Is_SV) type(SVR)
// if the bug is there, you will see --> _model2stata phase 3: warning: overflowed sv_indices before all rows filled. i=74, s=49, l=49
li... |
* inspect_model.do
* Inspect fitted model state, as known to Stata
* NOTE: this is autoincluded to all tests via makefile magic; hence,
* it is wrapped to silence errors on tests which don't make a struct svm_model
* AND *each line* is wrapped so that their errors are independent of the others, just as a defensive meas... |
* settings.do
set linesize 119
* make all platforms consistent in their batch output;
* NOTE: this is autoincluded to all tests via makefile magic
* tip buried in http://web.stanford.edu/group/ssds/cgi-bin/drupal/files/Guides/Stata_Unix__2011.pdf
* ALSO these comments are *after* the set, because it affects how stata p... |
G75*
%MOIN*%
%OFA0B0*%
%FSLAX25Y25*%
%IPPOS*%
%LPD*%
%AMOC8*
5,1,8,0,0,1.08239X$1,22.5*
%
%ADD10C,0.00000*%
%ADD11C,0.00100*%
D10*
X0032652Y0010767D02*
X0032652Y0395526D01*
X0032651Y0395526D02*
X0032654Y0395737D01*
X0032661Y0395947D01*
X0032674Y0396158D01*
X0032692Y0396368D01*
X0032715Y0396577D01*
X0032743Y0396786D01*
... |
/*
Copyright (c) 2018 Uber Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish... |
/*
Copyright (c) 2018 Uber Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish... |
/*
Copyright (c) 2018 Uber Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish... |
/*
Copyright (c) 2018 Uber Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish... |
/*
Copyright (c) 2018 Uber Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish... |
/*
Copyright (c) 2018 Uber Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish... |
/*
Copyright (c) 2018 Uber Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish... |
/*
Copyright (c) 2018 Uber Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish... |
/*
Copyright (c) 2018 Uber Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish... |
*CCR# Female Form Cleaning
**Make sure you are using the Female Database with a date
*Should automatically use the FRQ but if not, use the directory below
*use "$datadir/CCR#_FRQ_$date.dta"
**Examples
*drop duplicates, drop forms that are incorrectly created
*Drop duplicate RE Celine Dion
*Two forms for same persion... |
*CCR# Household Form Cleaning
**Make sure you are using the Household Database with a date
**Should not need to update the dataset directory but if you do, use the command below
*use "$datadir/CCR#_Combined_$date"
***RE/EA specific cleaning
*IF there are exact duplicates, drop
*If there are households that were ent... |
// ========= Drop duplicate Households =========
*=========== Clean Structure and Household number errors ==========================
|
****PMA 2020 Data Quality Checks****
** Original Version Written in Bootcamp July 21-23, 2014****
set more off
local CCRX $CCRX
******************************
use `CCRX'_Combined_$date.dta, clear
*Check if there are any remaining duplicates
duplicates report member_number
duplicates report FQmetainstanceID
captur... |
****PMA 2020 Data Quality Checks****
***Version Jan 17 2017****
**VERSION HISTORY AT END OF DO FILE
**First do file in series
/*Code is based on Stata 12 but some commands for Stata 11 and below are included and commented with *.
To use Stata 11 and below, comment out Stata 12 comments and remove the * before Stat... |
/****PMA 2020 Indonesia Data Quality Checks****
***Version Created in Bootcamp July 21-24, 2014
**Fourth do file in series***
This do file labels each variable in the Female Respondent questionnaire */
set more off
**If you want to run this file separately from the parent file, change the working directory below
cd... |
clear
clear matrix
clear mata
capture log close
set maxvar 15000
set more off
numlabel, add
/*******************************************************************************
*
* FILENAME: CCRX_HHQFQ_Wealth_Unmet_Generation_$date.do
* PURPOSE: PMA2020 HHQ/FQ wealth and unmet need generation in preparation for data an... |
clear
clear matrix
clear mata
capture log close
set maxvar 15000
set more off
numlabel, add
/*******************************************************************************
*
* FILENAME: PMA_HHQFQ_2Page_Analysis_$date.do
* PURPOSE: PMA2020 HHQ/FQ two page data analysis
* CREATED: Linnea Zimmerman (lzimme12@jhu.ed... |
****PMA 2020 Indonesia Data Quality Checks****
***Version 20 January 2014****
**Third do file in series***
/*This do file labels each variable in the household roster*/
clear
set more off
cd "$datadir"
local today=c(current_date)
local c_today= "`today'"
local date=subinstr("`c_today'", " ", "",.)
local todaystata=... |
****PMA 2020 Data Quality Checks****
***Version Written in Bootcamp July 21-23, 2014****
**Second do file in series***
clear matrix
clear
cd "$datadir"
/*This do file imports the Household Questionnaire (without the roster) into Stata and then cleans it*/
set more off
/*Import Household Questionnaire csv file int... |
** GPS checks for HHQ survey
** Authors Ann Rogers - Sally Ann Safi - Beth Larson - Julien Nobili
** Requirements: Listing.dta file (needs to be generated beforehand)
** version 1.1 (April 2019)
**********************Set directory**************************************
local datadir $datadir
local dofiles $d... |
clear
clear matrix
clear mata
capture log close
set maxvar 15000
set more off
numlabel, add
*******************************************************************************
*
* FILENAME: CCRX_Listing_v1_$date.do
* PURPOSE: Generates listing database and
* CREATED: Linnea Zimmerman (lzimme12@jhu.edu)
* DATA IN: ... |
/*
The purpose of this do file is to select households for reinterview.
1. Update the macros below to be country and round specific
2. Update the EA that you are selecting
3. Update the variable names that you want to export and keep
4. The information will export to an excel spreadsheet with the EA name/number
5. ... |
clear
clear matrix
clear mata
capture log close
set maxvar 15000
set more off
numlabel, add
/*******************************************************************************
*
* FILENAME: CCRX_Selection_11May2015
* PURPOSE: Generate database of households selected for interview
* CREATED: Linnea Zimmerman (lzimme... |
/*Water sources code updated to be consistent with Sri Vedachalam code*/
capture drop water_source_list_cc
input str60 water_source_list_cc
piped_indoor
piped_yard
piped_public
tubewell
protected_dug_well
unprotected_dug_well
protected_spring
unprotected_spring
rainwater
tanker
cart
surface_water
bottled
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.