stata中各种字符型变量的定义和使用

 时间:2026-02-16 09:37:04

1、gen where ="D" if foreign=="Domestic":origin

   replace where ="F" if foreign=="Foreign":origin

  如果foreign的值为domestic则where的值为D,否则where的值为F

stata中各种字符型变量的定义和使用

2、显示自定义变量.  list make foreign where

stata中各种字符型变量的定义和使用

3、显示where变量的详细信息

stata中各种字符型变量的定义和使用

4、定义model变量和modelwhere变量

  gen model =usubstr(make,ustrpos(make,"")+1,.)

  gen modelwhere =model +"  " + where

stata中各种字符型变量的定义和使用

5、显示model变量和modelwhere变量的值。

   list make  where  model  modelwhere

stata中各种字符型变量的定义和使用

  • 用SPSS建立ARIMA预测模型实例详细教程
  • SPSS如何对数据进行标准化
  • SPSS实例:[5]龙骨图(聚类谱系图)怎么看
  • 在stata中如何进行回归分析
  • stata多元回归分析步骤
  • 热门搜索
    洗衣机怎么用 肾虚怎么调理 微信聊天记录删了怎么恢复找回来 离婚协议怎么写 香菜饺子馅做法大全 干锅花菜的家常做法 踯躅怎么读 葡萄酒做法 五仁月饼的做法 毗怎么读