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
Using psmatch2 for panel dataDear Statalisters, I am using balanced panel data where the panel variable is country and the time v…
Unit Root CircleHi guys, I am currently doing a task, I am not really familiar with and I do need your help. It sa…
frame post not working after last updateHas anyone else noticed their code using frame post is now not working? I had code like below that w…
Data Analyst, Research Job Opening - Center for Community Health, Northwestern UnviersityWorking in the Center for Community Health in Northwestern University’s Institute of Public Health, …
Generate dummies from list of stringsDear STATAlisters, I have a string variable that tells me what insurances are accepted by individua…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating BMI when ht and wt have been recorded with different units
Post a Comment