在Stata中遇到“string variables may not be used as factor variables”这一错误时,通常意味着你尝试将字符串类型的变量用作因子变量,但Stata不支持这样做。为了解决这个问题,你可以按照以下步骤操作: 理解错误原因: 这个错误表明你尝试在回归分析或类似需要使用因子变量的命令中使用了字符串类型的变量。Stata要求因子变量
z-vars是包含感兴趣的控制变量名称的变量列表。 Factor variables允许使用因子变量。z变量的因子变量只允许在Stata 12或更高版本中使用。如果指定了option -xstandard-,则不允许key-vars使用因子变量。如果在指定的模型类型中允许,则允许使用aweights, fweights, iweights, and pweights Concomitant(varlist)指定控制变...
最多为 2,且必须为数值型,numeric还可以换成string(字符型)、fv(factor variables)等。
byable(recall) rclass // 设定程序返回值类型为r-class version 16.0 // 设定版本为stata 16 syntax varlist(min = 2 fv ts) [if] [in], Control(varlist fv ts) MODel(string) /// [Must(varlist fv ts) min(int 1) max(int 10) Times(real...
Multivariate methods: tests on means, covariances, and correlations; tests of multivariate normality; many enhancements to anova and manova; ... Programming features: tools for handling factor variables, more mathematical functions, soundex string matching functions, ... Data management: ...
My main argument is that user-written Stata packages are thesource of learningadvanced Stata programming. In general, any program - whether it is written by Stata staff or a Stata user - intends to solve a problem or facilitate a task. While other users can get benefit from using the progr...
Statistics: Why are observations that are noninformative about the dependent variable, but are known to be selected, excluded by heckman from the estimation sample? (Updated 26 July 2011) Statistics: Why do I see different p-values, etc., when I change the base level for a factor in my...
字符型(character),夹在双引号("")或单引号('')之间的字符串(string) 此外还有一些特殊符号表示数据对象的特殊取值。 Inf,表示无穷大(infinity),负无穷大表示为-Inf。如输入1/0即可显示Inf。 NA,缺失值(not available)。 NaN,表示不确定(not a number),如0/0的结果即是NaN。
faam module to score Foot and Ankle Ability Measure fabplot module for plots for each subset with rest of the data as backdrop factext module to extract factor values from a label variable created by parmest factmerg module to merge a list of factors to create string variables ...
WINSOR2: Stata module to winsorize data 6 PPML: Stata module to perform Poisson pseudo-maximum likelihood estimation 7 XTIVREG2: Stata module to perform extended IV/2SLS, GMM and AC/HAC, LIML and k-class regression for panel data models ...