#MAX VARIABLES IN STATA 13 HOW TO#
So for this small example I could try work with intervals, however the dataset is very large and therefore I cannot tell for sure how many values are in one interval. 1) create a variable representing the peak value for creat for a given patient 2) create a variable representing the date of the peak value I can do the first using egen max, but can't figure out how to do the second. The problem is I can use min() and max() combined to create two new variables for the values within indepdate, but if there are more then three I haven't been able to get a solution. STATA/SE 13 Maximum number of variables 32, 767 Maximum number of independent variables 10, 998 OPENING STATA To open STATA double click on the STATA/IC 13 (or STATA/SE 13) icon in the Novell Application Window. if iso_o_indepdate1=iso_o_indepdate2Įgen iso_d_indepdate1=min(indepdate * include), by(iso_d)Įgen iso_d_indepdate2=max(indepdate * include), by(iso_d) too many variables/independent variables you must request access to STATA/SE 13 from departmental computing. For instance, foreign in Statas auto dataset is an indicator variable: 1 if the car is. Descriptive statistics give you a basic understanding one or more variables and how they relate to each other. fillin expand by prefix with sum(), max(), min(), mean() etc. Stata 13, string expressions could have a maximum of 244 characters, and string func. If you are new to Stata we strongly recommend reading all the articles in the Stata Basics section. Stata has five different types of numeric variables: byte, int. So far I have been typing: gen include=1 if heg_o != 1Įgen iso_o_indepdate1=min(indepdate * include), by(iso_o)Įgen iso_o_indepdate2=max(indepdate * include), by(iso_o) This article is part of the Stata for Students series. Version 119 should usually only be used when the number of variables exceeds the capacity of dta format.
I want to create new variables for the group country (iso_o/iso_d) with characteristics of the variable indepdate. Version 117 can be read by Stata 13 or later.