destring: Convert string variables to numeric variables and vice versa. encode: Encode string into numeric and vice versa. encode主要用于将数据进行编码、分组,将连续性变量转换成分组变量。 它可以和另外一组命令一起记忆:encode,decode,recode和autocode()函数 。 代码语言:javascript 代码运行次数:0 运行 A...
Stata官方建议我们合理设置数据类型: Stata keeps data in memory, and you should record your data as parsimoniously (吝啬地) as possible. If you have a string variable that has maximum length 6, it would waste memory to store it as a str20. Similarly, if you have an integer variable, it ...
float:小数点后8位精确度double:小数点后16位精确度stata查看数据browse:浏览所有的数据browse 变量名称...
floattolong module to recast variables from float to long storage type flowchart module to generate subject disposition flow diagram figures in LaTeX using PGF/TikZ to include in manuscripts flower module to draw sunflower plots fmiss module to identify variables with problematic missing values fmlogi...
现在尝试pnupt age。这次Stata并未对age变量报错,但提示 ‘option generate() required’。带参数的选项需要指定参数类型(integer,real,string,name)和默认(不强制)值。generate需要一个name,没有默认值。尝试pnupt age, gen(2)。Stata会抱怨说2不是一个变量名。
Encourage Stata programmers to comment their programs and share their knowledge within their Stata packages This archive receives monthly update at the end of each month, based onthe latest updates on SSC server. If your package is not included in this archive, please add comments to your program...
Infloat, 24 bits are allocated fora. Thus the largest integer that can be exactly stored is 2^0 + 2^1 + ... + 2^23 = (2^24)−1 = 16,777,215. Well, actually, 2^24 = 16,777,216 is also precisely stored because it is even, but 16,777,217 cannot be precisely stored. Us...
hist headroom, freq headroom must take on integer values r(198); An alternate solution would be to create a group variable, and then use the graph command with the freq, hist, and bin() options. . egen y = group(headroom) . list y headroom in 1/10 y head~m 1. 3 2.5 2. 4...
weight float %8.0g weight in Kg brthwt int %8.0g Birth weight in g girl float %9.0g bg gender --- Sorted by: id age 该数据集包括以岁计的年龄 ( age )、以kilograms计的体重 ( weight ) 和性别 ( girl ) 的变量。我们可以通过列出一些...
/// -> float #let median(data, colId) = { arrayMedian(extractColumn(data, colId)) }/// Calculates the mode of an integer array. /// Converts all floats to integers. /// /// - arr (array): Array of integers. /// -> array ...