楼主: JCR
3564 7

[回归分析求助] 求助:GWR语句 [推广有奖]

  • 1关注
  • 0粉丝

已卖:476份资源

本科生

12%

还不是VIP/贵宾

-

威望
0
论坛币
497 个
通用积分
3.9204
学术水平
3 点
热心指数
3 点
信用等级
3 点
经验
1824 点
帖子
91
精华
0
在线时间
56 小时
注册时间
2007-6-5
最后登录
2022-11-30

楼主
JCR 发表于 2009-8-4 16:02:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
生产函数:已知数据为一个因变量Y,两个自变量K,L,目的是利用30个省份的截面数据通过GWR语句在stata中求得30个省不同的常数项,即全要素生产率A,有很多论文都作出这个结果了,但我不知道是怎么做的,有谁能够提点一下怎么在stata中编写这个语句,谢谢了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:R语句 全要素生产率 Stata 一个因变量 tata 因变量 自变量 我不知道 论文

沙发
潺涓 发表于 2010-3-18 14:36:10
换R软件再试试吧
已有 1 人评分论坛币 收起 理由
admin_kefu + 5 热心帮助其他会员

总评分: 论坛币 + 5   查看全部评分

[img][/img]

藤椅
whl8164 发表于 2010-4-21 10:10:46
还是算了吧,样本容量这么少。GWR的样本容量最好过百

板凳
xbdxlp 发表于 2010-4-22 15:16:38
谁有命令 文件传我lipeng249@126.com,谢谢 了

报纸
陈清鸿 发表于 2010-7-4 18:21:12
u大家好 谁有啊   GWR 语句
经济一家

地板
ylxylx 发表于 2012-3-25 11:28:49
没有啊

7
m8843620 发表于 2013-7-30 11:23:10
我也想知道 求教

8
蓝色波纹 发表于 2017-1-23 11:45:41
help for gwr, gwrgrid                          (STB-46: sg95)
-----------------------------------------------------------------------------------------------------------------------------------------------------------

Geographically weighted regression
----------------------------------

   gwr depvar [varlist] [if exp] [in range] , east(varname)
         north(varname)  [options]

   gwrgrid depvar [varlist] [if exp] [in range] , east(varname)
         north(varname) square(#) [options]

Where the allowed options are:

saving(filename) dots reps(#)  double eform family(familyname)
link(linkname) [ln]offset(varname) test replace noconstant
nolog scale(x2|dev|#) disp(#) iterate(#) init(varname)
outfile(filename) comma wide bandwidth(#) mcsave(filename)
sample(#)
           
where familyname is one of

        gaussian |  igaussian     |  binomial [varname|#]  |
        poisson  |  nbinomial [#] |  gamma

and linkname is one of

        identify |  log     |  logit    |  probit  |  cloglog  |
        opower # |  power # |  nbinomial

as when using glm.
For further details see help glm.


Description
-----------

gwr and gwrgrid fit geographically weighted regression, a method for
exploring spatial non-stationarity.

gwr fits regressions at each point at which there is an observation.
gwrgrid puts a grid over the observed data, and fits regressions at each
centroid of each grid square.

The user specifies the form of glm to apply to the regression. The default
being linear regression.


Requirements
------------

The data points must be specified, using a grid-reference approach.

east(varname)  should specify the name of the variable denoting the easting
of each point in space.

north(varname) should specify the name of the variable denoting the  
northing of each point in space.

When using gwrgrid, the size of the grid square can be defined using
square(#), otherwise a default setting of half the bandwidth is used.


Options for use with gwr
------------------------

test requests that the significance of the bandwidth be tested. This tests
whether the gwr model describes the data significantly better than the
global regression model. A simulated bandwidth of -99.99 indicates that the
simulation failed to converge.

sample(#) specifies the percentage of observations to be used in the
bandwidth calibration process, the default being 100%. This is especially
useful for large datasets as a way of reducing the amount of time taken to
calibrate the bandwidth. If this option is specified, #% of the observations
will be randomly sampled and used in the calibration process.

bandwidth(#) allows the user to input a value for the bandwidth, and reduce
the time gwr will take to run. For example, this is useful where a previous
run calibrated the bandwidth and there is no reason to recalibrate it.

nolog suppresses the display of the bandwidth optimization iterations.

iterate(#) specifies the maximum number of iterations allowed in estimating
the bandwidth. The default is 50.

saving(filename)  creates a Stata data file containing the parameter estimates
from each point at which the gwr is calculated.

outfile(filename)  creates a text file filename.raw containing the parameter
estimates from each point at which the gwr is calculated. The file is set out
as easting northing independent_vars constant.
This is useful if the results are to be mapped.
The comma and wide options for outfile() are available, see help outfile.

replace indicates that the file specified by saving() and/or outfile() may
be overwritten. It also applies to the mcsave() option.

reps(#) specifies the number of Monte Carlo simulations to be performed.
The default is 1000.

mcsave(filename) requests that the results of the Monte Carlo simulation
be saved rather than using a temporary file. This file will contain the
standard  errors of the parameter estimates for each run.

dots requests a dot be placed on the screen at the beginning of each run of
the Monte Carlo simulation, showing how far the simulation has gone.

double  specifies that the results stored in the file specified by saving() are
stored as doubles meaning 8-byte reals. By default they are stored as floats,
meaning 4-byte reals. See help datatypes.


glm options
-----------

Many of the options normally used with glm can also be used with gwr :

family(familyname) specifies the distribution of depvar; family(gaussian)
is the default.

link(linkname) specifies the link function; the default is the canonical link
for the family() specified.

scale(x2|dev|#) overrides the default scale parameter.  By default, scale(1)
is assumed for discrete distributions (binomial, Poisson, negative
binomial) and scale(x2) for continuous distributions (Gaussian, gamma,
inverse Gaussian).

        scale(x2) specifies the scale parameter be set to the Pearson
        chi-squared (or generalized chi-squared) statistic divided by
        the residual degrees of freedom.

        scale(dev) sets the scale parameter to the deviance divided by
        the residual degrees of freedom.  This provides an alternative to
        scale(x2) for continuous distributions and over- or under-dispersed
        discrete distributions.

        scale(#) sets the scale parameter to #.

[ln]offset(varname) specifies an offset to be added to the linear predictor.
        offset() specifies the values directly:     g(E(y)) = xB + varname.
        lnoffset() specifies exponentiated values:  g(E(y)) = xB + ln(varname).

disp(#) multiplies the variance of y by # and divides the deviance by #.  The
resulting distributions are members of the quasi-likelihood family.

noconstant specifies the linear predictor has no intercept term, thus forcing
it through the origin on the scale defined by the link function.

eform displays the exponentiated coefficients and corresponding standard errors
and confidence intervals as described in [R] maximize.  For binomial models
with the logit link, exponentiation results in odds ratios; for Poisson
models with the log link, exponentiated coefficients are rate ratios.

init(varname) specifies varname containing an initial estimate for the mean of
depvar.  This can be useful if you encounter convergence difficulties,
especially with binomial models with power or odds-power links.


Examples of gwr
---------------

   . gwr cars class unemp, east(easting) north(northing) test
   . gwr flag class unemp, east(east) north(north) fam(binomial) link(logit)
   . gwrgrid y x1, east(east) north(north) fam(b) link(l) square(10) samp(25)


Author
------

      Mark S. Pearce
      Department of Child Health,
      University of Newcastle upon Tyne.
      m.s.pearce@ncl.ac.uk


Reference
---------

C. Brunsdon, A.S. Fotheringham & M. Charlton,
Geographical Analysis (1996), 28, 281-98.


Also see
--------

    STB:  sg95 (STB-46)
Manual:  [R] glm
On-line:  help for glm

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-26 22:45