找回密码
 注册
查看: 366|回复: 0

R语言 spdep包 house()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 14:38:26 | 显示全部楼层 |阅读模式
house(spdep)
house()所属R语言包:spdep

                                        Lucas county OH housing
                                         卢卡斯县OH住房

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Data on 25,357 single family homes sold in Lucas County, Ohio, 1993-1998 from the county auditor, together with an nb neighbour object constructed as a sphere of influence graph from projected coordinates.
25,357单户住宅销售在1993-1998年,俄亥俄州的卢卡斯县,从县核数师,一起nb邻居对象构造一个领域的影响力从投影坐标图上的数据。


用法----------Usage----------


data(house)



格式----------Format----------

The format is: Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots. The data slot is a data frame with 25357 observations on the following 24 variables.
格式为:正式类的SpatialPointsDataFrame,[包“SP”有5个插槽。数据槽是一个数据框,25357以下24个变量的观察。




price a numeric vector
price一个数值向量




yrbuilt a numeric vector
yrbuilt一个数值向量




stories a factor with levels one bilevel multilvl one+half two two+half three
stories的一个因素水平onebilevelmultilvlone+halftwotwo+halfthree




TLA a numeric vector
TLA一个数值向量




wall a factor with levels stucdrvt ccbtile metlvnyl brick stone wood partbrk
wall的一个因素水平stucdrvtccbtilemetlvnylbrickstonewoodpartbrk




beds a numeric vector
beds一个数值向量




baths a numeric vector
baths一个数值向量




halfbaths a numeric vector
halfbaths一个数值向量




frontage a numeric vector
frontage一个数值向量




depth a numeric vector
depth一个数值向量




garage a factor with levels no garage basement attached detached carport
garage的一个因素水平no garagebasementattacheddetachedcarport




garagesqft a numeric vector
garagesqft一个数值向量




rooms a numeric vector
rooms一个数值向量




lotsize a numeric vector
lotsize一个数值向量




sdate a numeric vector
sdate一个数值向量




avalue a numeric vector
avalue一个数值向量




s1993 a numeric vector
s1993一个数值向量




s1994 a numeric vector
s1994一个数值向量




s1995 a numeric vector
s1995一个数值向量




s1996 a numeric vector
s1996一个数值向量




s1997 a numeric vector
s1997一个数值向量




s1998 a numeric vector
s1998一个数值向量




syear a factor with levels 1993 1994 1995 1996 1997 1998
syear的一个因素水平199319941995199619971998




age a numeric vector
age一个数值向量

Its projection is CRS(+init=epsg:2834), the Ohio North State Plane.
它的投影是CRS(+init=epsg:2834),俄亥俄州的北州平面。


源----------Source----------

Dataset included in the Spatial Econometrics toolbox for Matlab, http://www.spatial-econometrics.com/html/jplv7.zip.
数据集包括在空间计量经济学工具箱的Matlab,http://www.spatial-econometrics.com/html/jplv7.zip。


实例----------Examples----------


## Not run: [#不运行:]
house <- read.table("house.dat", header=FALSE)
names(house) <- c("price", "yrbuilt", "stories", "TLA", "wall", "beds",
  "baths", "halfbaths", "frontage", "depth", "garage", "garagesqft", "rooms",
  "lotsize", "sdate", "avalue", "long", "lat", "s1993", "s1994", "s1995",
  "s1996", "s1997", "s1998")
house$syear <- 1992 + house$s1993 + 2*house$s1994 + 3*house$s1995 +
4*house$s1996 + 5*house$s1997 + 6*house$s1998
house$syear <- factor(house$syear)
house$age <- (1999 - house$yrbuilt)/100
house$stories <- factor(house$stories, levels=1:7, labels=c("one",
"bilevel", "multilvl", "one+half", "two", "two+half", "three"))
house$wall <- factor(house$wall, levels=1:7, labels=c("stucdrvt",
"ccbtile", "metlvnyl", "brick", "stone", "wood", "partbrk"))
house$garage <- factor(house$garage, levels=0:4, labels=c("no garage",
"basement", "attached", "detached", "carport"))
library(sp)
coordinates(house) <- c("long", "lat")
proj4string(house) <- CRS("+proj=longlat")
library(rgdal)
house <- spTransform(house, CRS("+init=epsg:2834"))
library(spdep)
LO_nb <- graph2nb(soi.graph(tri2nb(coordinates(house)), coordinates(house)))
W <- as(as_dgRMatrix_listw(nb2listw(LO_nb)), "CsparseMatrix")
trMat <- trW(W, type="mult")

## End(Not run)[#(不执行)]
data(house)
## maybe str(house) ; plot(house) ...[#也许STR(房子);图(房子)...]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

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

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-17 21:45 , Processed in 0.025323 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表