From noreply at r-forge.r-project.org Tue Feb 24 13:18:36 2009 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 24 Feb 2009 13:18:36 +0100 (CET) Subject: [Asrr-commits] r9 - pkg pkg/R pkg/data pkg/man www Message-ID: <20090224121836.EA3069C119@r-forge.r-project.org> Author: wincent Date: 2009-02-24 13:18:36 +0100 (Tue, 24 Feb 2009) New Revision: 9 Added: pkg/R/inclusion.R pkg/data/KatzHauMahoney.Rdata www/rghuang.html Modified: pkg/CITATION pkg/ChangeLog pkg/R/QCA.R pkg/man/thresholdssetter.rd pkg/man/tsls2.Rd www/index.html Log: Modified: pkg/CITATION =================================================================== --- pkg/CITATION 2009-01-16 12:49:23 UTC (rev 8) +++ pkg/CITATION 2009-02-24 12:18:36 UTC (rev 9) @@ -1,10 +1,10 @@ To cite package 'ASRR' in publications use: -Huang Ronggui. 2008. ASRR: Applied Sociological Research with R. R package version 0.0-1.http://asrr.r-forge.r-project.org/. +Huang Ronggui. 2009. ASRR: Applied Sociological Research with R. R package version 0.0-1.http://asrr.r-forge.r-project.org/. @Manual{ASRR_rgHUANG, title = {ASRR: Applied Sociological Research with R}, author = {Ronggui HUANG}, - year = {2008}, + year = {2009}, url = {http://asrr.r-forge.r-project.org/} } \ No newline at end of file Modified: pkg/ChangeLog =================================================================== --- pkg/ChangeLog 2009-01-16 12:49:23 UTC (rev 8) +++ pkg/ChangeLog 2009-02-24 12:18:36 UTC (rev 9) @@ -1,2 +1,5 @@ +2009-01-17 + * check value of nlevels argument in cs_truthTable and reduce.default + 2009-01-16 * reduce is generic function now. Modified: pkg/R/QCA.R =================================================================== --- pkg/R/QCA.R 2009-01-16 12:49:23 UTC (rev 8) +++ pkg/R/QCA.R 2009-02-24 12:18:36 UTC (rev 9) @@ -229,9 +229,11 @@ { if (outcome==""||conditions =="") stop("You must specific outcome and conditions first.") fulldata <- mydata[,c(outcome,conditions)] - if (any(fulldata %in% c(0,1))) stop("data value must in [0,1].") outcomeData <- mydata[,outcome] + if (any(!outcomeData %in% c(0,1))) stop("outcome value must in [0,1].") conditionsData <- mydata[,conditions] + colmax <- sapply(conditionsData,max,na.rm=T) + if (any(colmax+1 > nlevels)) stop(sprintf("Mismatch of values of conditions and 'nlevels' argument.\n possible value is c(%s)",paste(colmax+1,collapse=","))) if (!is.null(weight)) weight <- mydata[[weight]] else weight <- rep(1, nrow(mydata)) method <- match.arg(method) getId <- function(implicant,nlevels){ @@ -424,6 +426,8 @@ dots <- list(...) mydata <- do.call(preprocess,c(list(mydata=mydata,nlevels=nlevels,outcome=outcome,conditions=conditions),dots)) mydata <- mydata$truthTable + colmax <- sapply(mydata[,conditions],max,na.rm=T) + if (any(colmax+1 > nlevels)) stop("Mismatch of values of conditions and 'nlevels' argument.") } else mydata <- mydata$truthTable ## if (keepTruthTable) truthTable <- subset(mydata,OUT!="?") else truthTable <- NULL Added: pkg/R/inclusion.R =================================================================== --- pkg/R/inclusion.R (rev 0) +++ pkg/R/inclusion.R 2009-02-24 12:18:36 UTC (rev 9) @@ -0,0 +1,34 @@ +suffnec.test <- function(data,outcome,conditions,type=c("suff","nec"), + benchmark=0.65,conf.level=0.95,...) +{ + ## outcome can be more than one + ## only test the individual condition + ## a separate function for the combination of conditions + type <- match.arg(type) + outData <- data[outcome] + conditionsData <- data[conditions] + ##augmentation of conditions Data by negation + N1 <- ncol(outData) + N2 <- ncol(conditionsData) + ans <- matrix(nrow=N2,ncol=N1) + rownames(ans) <- conditions + colnames(ans) <- outcome + if (type=="suff"){ + for (i in seq_len(N2)){ + for (j in seq_len(N1)){ + ans[i,j] <- mean(outData[j]>= conditionsData[i]) + ## add statistical test + } + } + } else if (type=="nec"){ + for (i in seq_len(N2)){ + for (j in seq_len(N1)){ + ans[i,j] <- mean(outData[j] <= conditionsData[i]) + ## add statistical test + } + } + } + ans +} + +##suffnec.test(KatzHauMahoney,c("EDF","EUDF","SDF","SUDF"),c("DIPF","LIEF","MTEF","SLF","SCF"),"nec") Added: pkg/data/KatzHauMahoney.Rdata =================================================================== (Binary files differ) Property changes on: pkg/data/KatzHauMahoney.Rdata ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: pkg/man/thresholdssetter.rd =================================================================== --- pkg/man/thresholdssetter.rd 2009-01-16 12:49:23 UTC (rev 8) +++ pkg/man/thresholdssetter.rd 2009-02-24 12:18:36 UTC (rev 9) @@ -10,7 +10,7 @@ } \usage{ thresholdssetter(x, nthreshold = 1, value = TRUE, method ="average", -thresholds=NULL,dismethod="euclidean",print.table=TRUE) + thresholds=NULL,dismethod="euclidean",print.table=TRUE) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -54,7 +54,9 @@ \author{Ronggui HUANG} %\seealso{ ~~objects to See Also as \code{\link{help}}, ~~~ } \examples{ -thresholdssetter(Lipset$GNPCAP,2,value=FALSE) -thresholdssetter(Lipset$GNPCAP,2) +cuttingPoint <- thresholdssetter(Lipset$GNPCAP,2,value=FALSE) +thresholdssetter(Lipset$GNPCAP,thresholds=cuttingPoint) +thresholdssetter(Lipset$GNPCAP,2)## the same as the previous one +thresholdssetter(Lipset$GNPCAP,2,print=FALSE) ## print recoded variable rather than a table } %\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line Modified: pkg/man/tsls2.Rd =================================================================== --- pkg/man/tsls2.Rd 2009-01-16 12:49:23 UTC (rev 8) +++ pkg/man/tsls2.Rd 2009-02-24 12:18:36 UTC (rev 9) @@ -10,7 +10,7 @@ \details{ This functions is a modification of tsls in sem package. The modified - tsls2 return the instrumental variables matrix, so can use endog_test + tsls2 return the instrumental variables matrix, so can use \code{endog_test} to conduct test of endogeneity. The usage of \code{tsls2} is the same as \code{\link[sem]{tsls}}. } Modified: www/index.html =================================================================== --- www/index.html 2009-01-16 12:49:23 UTC (rev 8) +++ www/index.html 2009-02-24 12:18:36 UTC (rev 9) @@ -36,7 +36,7 @@
The project summary page you can find Here. -
Homepage of the author. +
Homepage of the author. Other package by me: RQDA.
+ ++City University of Hong Kong +
+Department of Public and Social Administration +
Tat Chee Avenue, Kowloon, Hong Kong, China +
Telephone: (852) 34423832 +
Email: ronggui dot huang at gmail dot com +
Home Page: http://asrr.r-forge.r-project.org/rghuang.html. + +
Journal articles + +
???????2008?????????:??????????? ????????3??pp122-142?[CSSCI] ????????????????????????C4?????2008??8??
+
GUI Yong and HUANG Ronggui. 2008. Measuring Community Social Capital: An empirical study. Sociological Research. (3):122-142. (In Chinese)
+
+
???????????2007?????????????????????????? ?5??pp67-73?[CSSCI]
+
LI Jiejin, HUANG Ronggui Huang and FENG Ai. 2007. Urban community heterogeneity and neighborhood social capital. Fudan Journal (Social Sciences Edition), (5):67-73.(In Chinese)
+
+
???????????, 2007?????????????????, ?10??pp157-158 (???????????3?)? + +
???????????, 2007?????????????????,?3??pp38-47?[CSSCI]
+
FU Gangzhan, WEI Zhenyi and HUANG Ronggui.2007. Rural Entrepreneurs and Rural Development. Rural agricultural economics (3): 38-47.(In Chinese)
+
+
???????2006???????????????????????????????????????45(6)?pp36-42?[CSSCI]
+
GUI Yong and HUANG Ronggui. 2006. Is Urban Community "Gemeinschaft" Or Neighborhood. Journal of Huazhong Normal University (Humanities and Social Sciences). 25(6):36-42.(In Chinese)
+
+
??????????????2003????????????????????????????????????12(6),pp22-25?
+
GUI Yong, HUANG Ronggui, LI Jiejin and YUANG Jing. 2003. Direct election: Building social capital or saling democracy? Journal of Shanghai Polytechnic College of Urban, 12(6):22-25. (In Chinese)
+
+
*CSSCI means Chinese Social Science Citation Index. + +
Conference articles + +
HUANG Ronggui, 2008, Housing commercialization and decline of social capital?:Evidence from Shanghai, International Conference "Social Capital and Volunteering in Modern Ageing Cities: Building Intergenerational Inclusion", 15-17 Dec, 2008: City University of Hong Kong. + +
Huang Ronggui, 2008, Networks as mobilization structure, real and virtual: Empirical study of urban contentious politics, ????????????????, ?????????????????& ?????????????(Conference on grassroots resistance and urban governance. Fudan University.)? + +
Huang Ronggui, 2008, Grievance, collective interest and grassroots struggle: pilot study in Shanghai, The Third Annual Conference of The Asian Studies. + +
???,??, 2007, ????????????????,"?????????????????????"?????????
+
HUANG. 2007. Measuring community social capital: empirical study in Shanghai. ?Social capital and development in China?current empirical study and future directions?. Fudan University. (In Chinese)
+
+
??????????2007??????????????????????????????????????????????????????pp385--392? + +
???????2007??????????????????????????????????????????????????????????pp47-58?
+
HUANG Ronggui and GUI Yong, 2007. Will of participation or opportunity structure: homeownership and social involvement in community. In proceedings of ?Urbanization and construction of harmonious society in China?,pp47-58. Shanghai: Tongji University. (In Chinese)
+
+
???????????2006???????????????????????????????????????????????????????????????pp251-256?
+
HUANG Ronggui, LI Jiejin, and JIANG Jin.2006. Civic culture, mobilization and voting behavior. In Selected Proceedings of Shanghai Graduate Student's academic Forum?Urban Society and Culture.
+Shanghai University, December. (In Chinese)
+
+
???????????2006?????????????????????????????????????????????????????????????????????????????pp95-103 ? + +
RQDA. +
+A R package for Qualitative Data Analysis. It includes a number of standard Computer-Aided Qualitative Data Analysis features. It is seamlessly integrated with R To some extent, RQDA and R makes an integrated platform for both quantitative and qualitative data analysis. + +
ASRR. +
Miscellaneous R functions for quantitative sociological research. Most interesting ones are functions for QCA (e.g. csQCA, mvQCA, fsQCA). As far as I know, this is the first software supporting all three kinds of QCA. + + +
Added: www/rghuang.html =================================================================== --- www/rghuang.html (rev 0) +++ www/rghuang.html 2009-02-24 12:18:36 UTC (rev 9) @@ -0,0 +1,104 @@ +? + +
+ +
+ + + + +