How Do I Make a Data Column Numeric ContinuousI've been stumbling over this and haven't been able to find the proper syntax.
In my data I have a column titled "InstHead_Serial", which is always a numeric value of 6 numeric characters, with no decimal.
I want to treat the data as numeric in my analysis, but when it gets pulled in from our database it is character type data.
I've been trying many permutations of the command below to convert the data type to numeric/continuous, with no avail. If someone can help by providing the right syntax, it will be very helpful; thanks in advance!
Column( "InstHead_Serial" ) << data type( numeric, continuous, Format( "" ) );
Advanced Statistical ModelingConsumer and Market ResearchData AccessData Blending and CleanupMass CustomizationRe: How Do I Make a Data Column Numeric ContinuousThat did it; awesome and thank you very much!!
Re: How Do I Make a Data Column Numeric ContinuousI don't know why it is not working for you, but it is a simple fix, just separate out the Modeling Type into a separate statement.
column("InstHead_Serial") << data type(numeric,format("Best"));
column("InstHead_Serial") << modeling type(continuous);Re: How Do I Make a Data Column Numeric ContinuousThanks Jim!
I tried both of these format types and they both result in the following outcome:
Data Type is changed from character to numeric
Format is changed to either Fix Dec or best per the script recipe you provided
Modeling Type remains as "Nominal" vs "Continuous"; I tried the following:
, Continuous,
, "Continuous",
, Modeling Type ("Continuous")
, Modeling Type (Continuous)
I'm able to manually go into the data table and select the column and change the column info to Continuous, so it seems like something should work, but nothing I've tried so far.
Happy to try more ideas!
Re: How Do I Make a Data Column Numeric ContinuousThis should give you what you want
column("InstHead_Serial") << data type(numeric,continuous,format("Fixed Dec", 6,0));
or
column("InstHead_Serial") << data type(numeric,continuous,format("Best"));