在Stata中遇到“string variables may not be used as factor variables”这一错误时,通常意味着你尝试将字符串类型的变量用作因子变量,但Stata不支持这样做。为了解决这个问题,你可以按照以下步骤操作: 理解错误原因: 这个错误表明你尝试在回归分析或类似需要使用因子变量的命令中使用了字符串类型的变量。Stata要求因子变量
Factor variables Order <- See Stata's other features Stata handles factor (categorical) variables elegantly. You can prefix a variable withi.to specify indicators for each level (category) of the variable. You can put a#between two variables to create an interaction–indicators for each ...
WatchIntroduction to factor variables in Stata, part 1: The basics. WatchIntroduction to factor variables in Stata, part 2: Interactions. WatchIntroduction to factor variables in Stata, part 3: More interactions. Tell me more Read more in theStata Base Reference Manual; see[R] regress. And in...
. reg income i.xingbie //Stata报错 xingbie: string variables may not be used as factor variables r(109); . xi: reg income i.xingbie //xingbie,是一个字符型的分类变量 i.xingbie _Ixingbie_1-2 (_Ixingbie_1 for xingbie==女 omitted) Source | SS df MS Number of obs = 5 ---+...
With more than two levels, we create additional dummy variables. For example, for a colour variable with three levels (blue, red, green), we create two dummy variables. X1X2=={10 if the colour is blue if the colour is not blue{10 if the colour is red if the colour is not red...
of 4 variables: ## $ 编号 : num 1 2 3 ## $ 品种 : chr "红富士" "黄元帅" "秦冠" ## $ 尺寸 : chr "big" "small" "median" ## $ 尺寸_因子: Factor w/ 3 levels "big","median",..: 1 3 2 levels(apple_add_factor$尺寸_因子) ## [1] "big" "median" "small" 上面的...
'data.frame':3obs. of3variables: $name1...c..boy...girl...dog.. : chr"boy""girl""dog" $year1...c..12...16...7.. : chr"12""16""7" $add1...c..school...home...wc..: chr"school""home""wc" > print(summary...
Factor the polynomialyfor factors containing symbolic variablesbandc. syms a b c d y = -a*b^5*c*d*(a^2 - 1)*(a*d - b*c); F = factor(y,[b c]) F = [ -a*d*(a - 1)*(a + 1), b, b, b, b, b, c, a*d - b*c] ...
(F-test) was evaluated at each factor level by ANCOVA. This analysis evaluates whether the calculated C-silt + clay or N-silt + clay values are equal to the factor variables, i.e., whether the slopes are similar between categorical factors. Distribution analyses and ANCOVAs were ...
9B). Four independent prognostic factor variables, namely, RAB7A expression, radiation therapy, histological grade and residual tumour, were included in the model. These variables were allocated points using a point scale derived from multivariate Cox analysis. To identify the points for the variables...