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 regexp to extract variables from stringI have a string variable Code: People that provides a sentence about the number and type of people …
rowminI would like to create a new variable which takes the minimum value in each row, (ignoring the zeros…
How to generate different matrices based on different factors and different factors levelsmata D = (1,1,1 \ 2,1,1 \ 3,1,2 \ 4,1,2 \ 5,1,3 \ 6,1,3 \ 7,2,1 \ 8,2,1 \ 9,2,2 \ 10,2,2 \ 11,2,3 \ …
Sample size for count dataHi listers, I was asked to estimate the sample necessary to detect a difference in the average numb…
Interacting Categorical VariableDear all, I have two categorical variables that are socialclass (1=low, 2=middle, 3=high) and jobty…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating BMI when ht and wt have been recorded with different units
Post a Comment