PDF4PRO ⚡AMP

Modern search engine that looking for books and documents around the web

Example: marketing

encode — Encode string into numeric and vice versa

Encode string into numeric and vice versaDescriptionQuick startMenuSyntaxOptions for encodeOptions for decodeRemarks and examplesReferencesAlso seeDescriptionencodecreates a new variable namednewvarbased on the string variablevarname, creating, addingto, or just using (as necessary) the value labelnewvaror, if specified, notuseencodeifvarnamecontains numbers that merely happen to be stored as strings; instead, usegeneratenewvar= real(varname)ordestring; see[U] Categorical string variables, [FN] string functions,and [D] a new string variable namednewvarbased on the encoded numeric variablevarnameand its value startGenerate numericnewv1from stringv1, using the values ofv1to create a value label that is appliedtonewv1encode v1, generate(newv1)Same as above, but name the value labelmylabel1encode v1, generate(newv1) label(mylabel1)Same as above, but refuse to encodev1if values exist inv1that are not present in preexisting valuelabelmylabel1encode v1, generate(newv1) label(mylabel1) noextendConvert numericv2to stringnewv2using the value label applied tov2to generate values ofnewv2decode v2, generate(newv2)MenuencodeData>Create or change data>Other variable -transformation commands> Encode value labels from stringvariabledecodeData>Create or change data>Other variable -transformation commands>Decode strings from labeled numericvariable1

6encode— Encode string into numeric and vice versa decode decode is used to convert numeric variables with associated value labels into true string variables. Example 4 We have a numeric variable named female that records the values 0 and 1. female is associated with a value label named sexlbl that says that 0 means male and 1 means female:

Loading..

Tags:

  Variable, Numeric, String, Convert, Convert numeric variables, String variables

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Spam in document Broken preview Other abuse

Transcription of encode — Encode string into numeric and vice versa

Related search queries