Re: [R] Any packages for conducting AHP( Analytic Hierarchy Process) data
I have so far had the only return to my query from Steve Dutky. I am familir with matrix eigen value and vector manipulation. If you have anything to share with me, it would be good chance for me to follow up the AHP-related thing. Furthermore, I am good at statistics fairely. Thanks for your comments, Kum-Hoe Hwang, Ph.D. On 2/19/07, Steve Dutky [EMAIL PROTECTED] wrote: Hi, Kum-Hoe Hwang, Did you get any help for your query? I have used R/Splus for a number of years, primarily for isolating anomalies with TCP/IP network traffic. I have become somewhat adept at importing data from a variety of sources and formats into R. I first became interested in AHP some time back, but have never gotten around to working with it under R. I probably cannot help you much with the analysis of AHP data. If your main problem involves casting your AHP data into a data.frame, I will be happy to assist you as far my time and understanding allow. Have you reviewed the packages for handling eigen values/vectors? Thanks, Steve Dutky 400 Domer Ave Takoma Park, MD 20912 US Message: 101 Date: Wed, 14 Feb 2007 16:56:11 +0900 From: Kum-Hoe Hwang [EMAIL PROTECTED] Subject: [R] Any packages for conducting AHP( Analytic Hierarchy Process) data To: R Help mail address r-help@stat.math.ethz.ch Message-ID: [EMAIL PROTECTED] Content-Type: text/plain Hi, R Lovers! I have some survey data. I'd like to run R or R packages for processing data inputted from AHP(Analytic Hierarchy Process) survey. Are there any R packages or subsititues for running data from AHP survey. Thanks in advance, -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516Email : [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Are there any packages or methods for running data from AHP(Analytic Hierarchy Process) survey?
Hi, R Lovers! I have some survey data. I'd like to run R or R packages for processing data inputted from AHP(Analytic Hierarchy Process) survey. Are there any R packages or subsititues for running data from AHP survey. Thanks in advance, -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516Email : [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Any packages for conducting AHP( Analytic Hierarchy Process) data
Hi, R Lovers! I have some survey data. I'd like to run R or R packages for processing data inputted from AHP(Analytic Hierarchy Process) survey. Are there any R packages or subsititues for running data from AHP survey. Thanks in advance, -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516 Email : [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] How to get multiple Correlation Coefficients
Hi I have used a polycor package for categorical correlation coefficients. I run the following script. But there were no results. Could you tell me how to correct the script? Thanks in advance, vars - names(sdi) for (i in 1:length(vars)) { for (j in 1:length(vars)) { paste(vars[i], and , vars[j]) polychor(vars[i], vars[j]) # corr } } -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516Email : [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] How to Get Categorical Correlation Coefficient
Howdy Gurus ! I have a different correlation result from the same data. The corridor1 string variable is expressed as a number like the corridor2 number variable. -- levels(corridor1) [1] A B C D E F levels(as.factor(corridor2)) [1] 0 1 2 3 4 -- I have the correlation results followings using cor() function. -- cor(jh1_1, as.factor(corridor1)) [1] 0.01528538 cor(jh1_1, as.factor(corridor2)) [1] -0.4972571 -- I donot know why the above correlation coefficients used the same data are different. They are 0.015 from as.factor(corridor1), -0.497 from as,factor(corridor2). The string variable corridor1 is the same catergory data with the variable corridor2. The difference is that A is replaced with 0, B with 1, C with 2, . Could you tell me why they are different, and which correlation coefficient is correct? Thank in advance, -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516Email : [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] How to Get Categorical Correlation Coefficient
There was my mistake in the earlier email. I have corrected the error by dropping ns.omit from data.frame(). I added a new corrected correlation and output followings: -- # nrow(sdi) [1] 65613 print(corridor1[65600:65613]) [1] C C C C F [6] F F F B B [11] F F B B Levels: B C D E A F print(corridor2[65600:65613]) [1] 4 4 4 4 2 2 2 2 1 1 2 2 1 1 summary(corridor1) B CD E A F 1509213456 6652 1611 179627006 summary(corridor2) Min. 1st Qu. MedianMean 3rd Qu.Max. 0.0 1.0 2.0 2.3 3.0 5.0 summary(as.numeric(as.factor(corridor1))-as.numeric(as.factor(corridor1))) Min. 1st Qu. MedianMean 3rd Qu.Max. 0 0 0 0 0 0 table(corridor1,corridor2) corridor2 corridor1 0 1 2 3 4 5 B 0 15092 0 0 0 0 C 0 0 0 0 13456 0 D 0 0 0 6652 0 0 E 0 0 0 0 0 1611 A 1796 0 0 0 0 0 F 0 0 27006 0 0 0 --- There are different correlation coefficients from the following results: Are there any functions or packages for a categorical correlation? cor(jh1_1, corridor1) [1] 0.02753303 cor(jh1_1, as.factor(corridor2)) [1] -0.3682788 Thanks for your kindness, Kum On 12 Oct 2006 10:25:33 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: Kum-Hoe Hwang [EMAIL PROTECTED] writes: Howdy Gurus ! I have a different correlation result from the same data. The corridor1 string variable is expressed as a number like the corridor2 number variable. -- levels(corridor1) [1] A B C D E F levels(as.factor(corridor2)) [1] 0 1 2 3 4 -- I have the correlation results followings using cor() function. -- cor(jh1_1, as.factor(corridor1)) [1] 0.01528538 cor(jh1_1, as.factor(corridor2)) [1] -0.4972571 -- I donot know why the above correlation coefficients used the same data are different. They are 0.015 from as.factor(corridor1), -0.497 from as,factor(corridor2). The string variable corridor1 is the same catergory data with the variable corridor2. The difference is that A is replaced with 0, B with 1, C with 2, . Could you tell me why they are different, and which correlation coefficient is correct? One thing that strikes me is that corridor1 has 6 levels and corridor2 has 5... In general correlations are not expected to work on factors so I'd be explicit about taking as.numeric(). A glance at table(corridor1,corridor2) should be informative too, as would a summary(as.numeric(as.factor(corridor1))-as.numeric(as.factor(corridor1))) -- O__ Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516Email : [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] How to solve Different Correlation Results
Howdy Gurus ! I have a different correlation result from the same data. The corridor1 string variable is expressed as a number like the corridor2 number variable. -- levels(corridor1) [1] A B C D E F levels(as.factor(corridor2)) [1] 0 1 2 3 4 -- I have the correlation results followings using cor() function. -- cor(jh1_1, as.factor(corridor1)) [1] 0.01528538 cor(jh1_1, as.factor(corridor2)) [1] -0.4972571 -- I donot know why the above correlation coefficients used the same data are different. They are 0.015 from as.factor(corridor1), -0.497 from as,factor(corridor2). The string variable corridor1 is the same catergory data with the variable corridor2. The difference is that A is replaced with 0, B with 1, C with 2, . Could you tell me why they are different, and which correlation coefficient is correct? Thank in advance, -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516Email : [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] How to Interpret Results of Regression in R
1.581 529.72 2e-16 *** as.factor(corridor1)1.965 131.40 2e-16 *** as.factor(ic) 0.0217.31 0.0069 ** OD_total 0.0006610.22 0.6375 nfirm_dong 0.101 32.05 1.6e-08 *** house1 1.131 377.88 2e-16 *** house2 0.0029911.00 0.3165 house3 1.581 530.37 2e-16 *** house4 0.761 254.75 2e-16 *** Residuals 8.86 2974 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 GVIF Df GVIF^(1/2Df) as.factor(parkfee)1.570 21.119 fare 1.562 11.250 as.factor(ohouse) 1.063 31.010 tripMIN 1.110 11.054 as.factor(Devt2) 2.378 31.155 cityarea 4.188 12.046 coreDistance 7.037 12.653 density 3.338 11.827 as.factor(corridor1) 10.050 51.260 as.factor(ic) 2.985 11.728 OD_total 2.667 11.633 nfirm_dong2.367 11.539 house13.762 11.940 house22.571 11.604 house33.536 11.880 house41.766 11.329 -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516 Email : [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to get coefficients of regression or Anova
Hi R Gurus! I conducted regression and anova followings : Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept) 6.07e-01 5.95e-02 10.19 2e-16 *** nemp 2.87e-06 1.04e-07 27.63 2e-16 *** as.factor(corridor1)A -8.81e-02 2.13e-02 -4.14 3.6e-05 *** as.factor(corridor1)B1.75e-01 3.02e-025.78 8.8e-09 *** as.factor(corridor1)C 1.09e-02 2.74e-020.40 0.69196 as.factor(corridor1)D 2.58e+00 1.56e-01 16.51 2e-16 *** as.factor(corridor1)E -6.75e-03 1.76e-02 -0.38 0.70107 ... I do want to get the following results: Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept) 6.07e-01 5.95e-02 10.19 2e-16 *** nemp 2.87e-06 1.04e-07 27.63 2e-16 *** as.factor(corridor1)? ??? ?* But I do not know how to get coefficients of regression or Anova model. Thanks in advance, -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516Email : [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to get correct coefficients from lm model
Howdy I apologize for duplicated posting. But I decided to correct my previous posting. I had the regression results using r - lm(Y ~ nemp + as.factor(devt), data=d). First, there is the result of anova(r). Here I could not find regression coefficients. Response: Y Df Sum Sq Mean Sq F value Pr(F) nemp1 58.258.2 1233.23 2e-16 *** as.factor(devt)33.6 1.2 25.69 2.6e-16 *** Second, there is the result of summary(r) that I am confused with too many coefficients for a factor variable devt. Because there are three coefficients for factor variables such asas.factor(devt)A , as.factor(devt)B, as.factor(devt)C. Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept) as.factor(devt1)33.6 1.2 25.69 2.6e-16 *** 5.95e-02 10.19 2e-16 *** nemp 2.87e-06 1.04e-07 27.63 2e-16 *** as.factor(devt)A2.44e-02 1.47e-021.66 0.09630 . as.factor(devt)B -1.10e-01 1.40e-02 -7.90 4.6e-15 *** as.factor(devt)C -9.19e-03 1.53e-02 -0.60 0.54953 Is this model right as a tentative model at least? Y = 6.07e-01 + 2.87e-06* nemp + 2.44e-02 * as.factor(devt)A - 1.10e-01 * as.factor(devt1)B - 9.19e-03 * as.factor(devt)C And so, my question is which coefficients should I use for a final model?. Thanks in advance, -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516Email : [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] what is scale function? Is it for variable transformation?
HOwdy I read R books about scale function for variable transformation. Acoording to this book scale function leads me to better regression results. Or am I worng? I hope somebody tell me about a scale function? Is it for variable transformation? -- Kum-Hoe Hwang, Phone : 82-31-250-3516Email : [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] How to sample x-y coordinates from GIS files
Hi Gurus! I have a job that is to get randomly samples from point-based GIS data (sp called shape GIS files) under the total sum resctricted. For example, I would like to take random smaples under the 1000 persons in each city. The randomly sampled persons should not be over 1000 any case. Thank you in advance, -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3283 Email : [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to estimate Type I, Type III SS
Howdy, R gurus I 'd like to know hwo to calculate or estimate SS of Type I and Type III in ANOVA or other anaysis in R. Thanks, -- Kum-Hoe Hwang, Ph.D. Kyonggi Research Institute, Korea (ROK) (Urban Planning and GIS) Phone : 82-31-250-3283 Email : [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] best analysis method : for time series ans cross sectional data
Howdy What I 'd like to analyze with a large data on building permits is to find time series effect of urban policy on buildings as well as cross-sectional effects in any. In 1990 the specialZone urban policy was introduced. I guess that the effects of this specialZone policy would be different from countys. There are counties that do not welcome this specialZone forced to design it. One of the important aims is to find 1) time series effect using Dummy variable, 2) cross-sectional effects using specialZones variable below. The data has items like year(1970-2000), floorSpace, county, specialZones agianst permitting large buildings. specialZones have been designed after 1990. (Dummy = 1 after 1990, Dummy =0 before 1990) I have tried three methods, such as lm(floorSpace ~ county, specialZones, Dummy), glm(floorSpace ~ county, specialZones, Dummy), aov(floorSpace ~ county, specialZones, Dummy). What I am focusing on is best method among lm, glm, aov or others not siginificant results. I have wasted too much time for this. I welcome your comments. Thanks a lot, -- Kum-Hoe Hwang, Ph.D. Kyonggi Research Institute, Korea (ROK) (Urban Planning and GIS) Phone : 82-31-250-3283 Email : [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] How to solve error : cannot allocate vector of size 1208235 Kb
I appreciate all who helped all. My problem was not enough memory definietely. First I tried smaple function that solved my problem nicely. Second, I tried a method=sparse option in lagsarlm model. Comparing results led me to conclude the first trial that estimates better results in the lagsarlm model. Thanks millions, Kum On Fri, 11 Feb 2005 13:02:53 +0100 (CET), Roger Bivand [EMAIL PROTECTED] wrote: On Fri, 11 Feb 2005, Kum-Hoe Hwang wrote: Howdy R gurus ! I am newbie to R I use R 2.0.1 in Windows XP. When I run R I got the follwoing memory error. My physical memory size is 3 Gb. My R got the memory problem when it reached to about 2 Gb. This is not a question just about memory but also about methods. The number of rows in sfr.data is sufficiently large (about 35000?) that the NxN matrices being used need a lot of room. That is why the function provides the SparseM method to cater for your situation (unless you have chosen a representation of neighbour weights that is not similar to symmetric). If you choose a symmetric or similar to symmetric representation, you can use the SparseM method, which, as its name suggests, uses sparse matrices. All of this is described in help(lagsarlm). It is also quite possible that the last 95% of your data add almost no new information, so you could also consider choosing a subset for analysis, in which case the eigen method using dense matrices should work. Thanks in advance, library(spdep) sfr.lagsarlm - lagsarlm(sfr.data$Bldgsqft ~ sfr.data$Ncounty + sfr.data$Nugb + sfr.data$Ngroup, data=sfr.data, listw=sfr.listw, method=eigen) Error: cannot allocate vector of size 1208235 Kb memory.size(max=FALSE) [1] 17862584 memory.limit(size=NA) [1] 3145728000 -- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Breiviksveien 40, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93 e-mail: [EMAIL PROTECTED] -- Kum-Hoe Hwang, Ph.D. Kyonggi Research Institute, Korea (ROK) (Urban Planning and GIS) Phone : 82-31-250-3283 Email : [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] How to solve error : cannot allocate vector of size 1208235 Kb
Howdy R gurus ! I am newbie to R I use R 2.0.1 in Windows XP. When I run R I got the follwoing memory error. My physical memory size is 3 Gb. My R got the memory problem when it reached to about 2 Gb. Thanks in advance, library(spdep) sfr.lagsarlm - lagsarlm(sfr.data$Bldgsqft ~ sfr.data$Ncounty + sfr.data$Nugb + sfr.data$Ngroup, data=sfr.data, listw=sfr.listw, method=eigen) Error: cannot allocate vector of size 1208235 Kb memory.size(max=FALSE) [1] 17862584 memory.limit(size=NA) [1] 3145728000 -- Kum-Hoe Hwang, Ph.D. Kyonggi Research Institute, Korea (ROK) (Urban Planning and GIS) Phone : 82-31-250-3283 Email : [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html