Hello,
I am trying to create a new variable for BMI and I have a dataset with continuous variable "height" and another variable "htunits" recorded as cm or inches, and continuous variable "weight" with variable "wtunits" recorded as kg or lbs. When I attempt to convert all height values to m and weight to kg using the gen and replace commands I am getting an error "type mismatch"
Could anyone suggest syntax to do this properly?
Thanks in advance
Rene
Related Posts with Calculating BMI when ht and wt have been recorded with different units
Adding options to a package (.ado)Hi everyone,
I have written a code to run the LFK index (Int J Evid Based Healthc. 2018 Dec;16(4):1…
Rename variables to remove part of the textDear Statalists,
I have the following variables and would like to rename them to remove untitled###…
Question spmapHi,
I have a question about spmap. I'm just a beginner with STATA and I want to know how to use spm…
BetaregHi all,
I have a propotion dependent variable that’s greater than zero and less then one. The mean …
ivreg, ivprobit and biprobit which one to use? (any theoretical reasoning?)As I do not have any econometric background I find it difficult to understand which one to use when …
Subscribe to:
Post Comments (Atom)
0 Response to Calculating BMI when ht and wt have been recorded with different units
Post a Comment