Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 30.414.297 Times

Recode Categorical Variable into New Binary Variables 1.0

  Date Added: April 10, 2013  |  Visits: 203

Recode Categorical Variable into New Binary Variables

Report Broken Link
Printer Friendly Version

Product Homepage
Download (18 downloads)

Adds N-1 binary (effect or dummy coded) variables based on a categorical variable to your dataset.% OUTPUT%Returns your dataset with N-1 binary variables recoded from a%categorical var that has N categories.%The Nth category isn't included as a distinct variable (will be represented by all 0's or all -1's, depending on recoding_type)%So list the least important category last in the category_values parameter%Also (optionally) drops the original categorical var.%% Works best when the variable contains chars or numeric/logical values%%% INPUTS (** = optional)% If you plan to omit an optional param, you must also omit all the params that follow it%% 1) dataset - (dataset) the actual dataset variable%% 2) variable_name - (char or number) name/column number of a categorical variable in dataset%% 3) category_values** - (cell vector of chars/numbers/logicals, or a vector% of numbers/logicals) names of cats in the var (default=unique(dataset.variable))% MUST ONLY INCLUDE LEGAL CHARACTERS FOR NAMING CONVENTIONS% e.g. no '?' or '!' or '%' involved in any category values%% 4) recoding_type** - (char) 'dummy' or 'effect' (case insensitive).% Dummy creates 0,1 variables, with all 0's representing the Nth category,% Effect creates -1,1 variables, with all -1's representing the Nth category% default = 'dummy'%% 5) drop_original** - (logical) whether to drop the original un-recoded variable from the dataset (default=false)%% 6) separator** - (char) the char string to put inside the new varname,% between the name of the original variable and the category value% default = '_'% e.g., by default, a dummy variable that represents the category 'T' in% Var1 will be named 'Var1_T'% MUST ONLY INCLUDE LEGAL CHARACTERS FOR NAMING CONVENTIONS% e.g. no '?' or '!' or '%' involved in the separator%%% EXAMPLES%if dataset Exam_Data's variable c1 has 2 cats: 'a' and 'b',%you would type:% Exam_Data = categorical2bins(Exam_Data,'c1',{'a','b'});%and the function would do the following:% Exam_Data.c1_a = zeros(nrows,1);% Exam_Data.c1_a(strcmp(Exam_Data.c1,'a'))=1;%% %if 3 cats: a b and c (listed in that order in category_values)%you would type:% Exam_Data = categorical2bins(Exam_Data,'c1',{'a','b','c'});%and the function would do the following:% Exam_Data.c1_a= zeros(nrows,1);% Exam_Data.c1_a(strcmp(Exam_Data.c1,'a'))=1;% Exam_Data.c1_b= zeros(nrows,1);% Exam_Data.c1_b(strcmp(Exam_Data.c1,'b'))=1;%% Also works for numbers% If 3 cats: 1,2, and 3 (doubles)...%you would type:% Exam_Data = categorical2bins(Exam_Data,'c1',{1,2,3});% OR% Exam_Data = categorical2bins(Exam_Data,'c1',[1,2,3]);%and the function would do the following:% Exam_Data.c1_1= zeros(nrows,1);% Exam_Data.c1_1(Exam_Data.c1==1)=1;% Exam_Data.c1_2= zeros(nrows,1);% Exam_Data.c1_2(Exam_Data.c1==2)=1;

Requirements: No special requirements
Platforms: Matlab
Keyword: Default Dfalse Drop Original Inside Logical Separator String Unrecoded Varname
Users rating: 0/10

License: Shareware Size: 10 KB
Text Editors  -  Hekapad 0.21
Hekapad is a free text editor for Microsoft Windows available in 11 languages. Hekapad will do a backup of the document so you'll never lose you work. You can set the opacity of Hekapad up to 30%.You can drag and drop text inside Hekapad.
596.84 KB  
MP3 Tools  -  Reallusion iClone EX Edition 4.1
Real-time animation evolves with 3D Video FX, motion paths, HDR and rapid drag & drop creation inside iClone4. iClone4 introduces new features that combine video production with 3D real-time animation. The result is a powerful production tool for...
218.4 MB  
Modules  -  WP-RTL 0.1
The plugin re-enables the text directions functionality that exists by default in the original TinyMCE editor.InstallationUnpack and upload it to the /wp-content/plugins/ directory.Activate the plugin through the 'Plugins' menu in WordPress....
Development Tools  -  Create Unique Interaction Variables 1.0
function data_set = create_interaction_variables(data_set,vars,range_nways,separator,max_varname_length)% create_interaction_variables%% for Matlab R13+% version 1.1 (April 2012)% (c) Brian Weidenbaum% website:
10 KB  
Networking  -  Better Adjacent Post Links 1.1
If you are used to link the 'previous' and 'next' posts on a wordpress blog using their own title, you have probably noticed how more often than not too long titles can cause broken lines, hence unpredictable results in terms of page layout.The...
10 KB  
Networking  -  Hikari Email & URL Obfuscator 0.07.17
Spam is website publishers #1 concern, we wanna share our and our visitors' emails to those who should have access to them, but don't want spam harvesters stealing them and sending garbage to us. A lot of techniques had been developed to hide our...
10 KB  
Development Tools  -  Calculate PSD of a signal using Welch algorithm 1.0
This function Calculates Power Spectral Density of signal vector X using Welch's averaged periodogram method.X is divided into sections, then windowed by the WINDOW parameter.The magnitude squared of the length NFFT DFTs of the sections are...
10 KB  
Networking  -  Galleria WP 1.2.5
Galleria WP is a image gallery plugin for WordPress2.5 or laters. It is used WordPress 2.5's short code functionality.Features: * Galleria image gallery * Switchable CSS styles * Override default CSS styles * Show EXIF meta data * Automatic...
10 KB  
Modules  -  WP-Weather 0.4.4 widget - shows forecast information for a city. Displays image related to current conditions. Weather can also be inserted into a post or page via the shortcode [weather_display].If your images are not displaying, go the the plugin...
2.3 MB  
Modules  -  Taxonomy Widget for Drupal 5.x-1.3
Implements a new form element named taxonomy_widget for selecting a vocabulary and then a term within that vocabulary. The term list is dynamically populated by jQuery when a vocabulary is selected.The element takes an array for the #default_value...
10 KB  
Scripts  -  Freelancer Script 5.05
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Post projects. Featured projects. Private projects. Sealed projects. Edit/delete projects. Select freelancers....
5.49 MB  
Scripts  -  B2B Script 4.20
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Sign-up Account (Registration of account). Lead generation tools (for the sellers). Email verification to...
5.49 MB  
Scripts  -  B2C Script 5.06
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). The script comes with totally editable site colors, icons and graphics Multilevel categories allows extensive browsing Admin can change Category ordering or...
5.49 MB  
Scripts  -  Social Networking Script 2.86
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Registration with name, email, password, date of birth etc. User can add multiple school, college, university with start...
5.49 MB  
Scripts  -  Business Networking Script 8.04
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Ajax based interface. Profile creation. Different types of profile. Profile for jobseekers, employers and employed...
5.49 MB  
Development Tools  -  VMP Viewer 1.0
This is a very rudimentary tool to visualize the VMP files generated by BrainVoyager. Useful to share files with people who do not have BV.
10 KB  
Development Tools  -  Sending reports and timestamped file by emailing 1.0
main executing reference usage:[1] usage_send_mail.mIllustrates email sending with multiple separate files or single timestamped tar file. Attachment failure is properly handled, with continuation of report emailing without the attachment.[2]...
768 KB  
Development Tools  -  IrisMVC 2.0 rc1
IrisMVC is an OOP PHP framework that developers can use as a strong and secure foundation to build on various web applications following the Model-View-Controller (MVC) pattern. It provides the basic functionality developers need, without...
51.2 KB  
Development Tools  -  7-Zip for Script 4.42
7-Zip is a file archiver with a high compression ratio.Features:- High compression ratio in new 7z format with LZMA compression- Supported formats:- Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR- Unpacking only: RAR, CAB, ISO, ARJ, LZH, CHM,...
624.64 KB  
Development Tools  -  Barnardextest 1.0
This file, as the Fisher's exact test, performs the exact probability test for a table of frequency data cross-classified according to two categorical variables, each of which has two levels or subcategories (2x2). It is a non-parametric...
10 KB