[R] Run-time error 521 in SciViews
Dear list, I use SciViews R Console 0.8.9 with R-2.2.1 under Windows XP SP2, and it works very well for most of time. However, sometimes, when commands were executed by clicking F5, the error Run-time error 521, Can't open clipboard pop out. After choosing Yes, the both R console and SciViews exits, and all things in the Command window losts, which is very annoying. Could anyone tell me how to avoid this problem? Thanks. Wuming __ 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] Error when loading odesolve
Dear list, I installed odesolve package (0.5-15) in R 2.3.1 in a Solaris server (Generic_118558-11 sun4u sparc SUNW,Sun-Blade-1000). The installing progress completed without errors, though several warnings like Warning: Option -fPIC passed to ld, if ld is invoked, ignored otherwise were outputed. However, when loading the odesolve package by library(odesolve), following error messages pop out: library(odesolve) Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library '/project/scratch/ligroup/R1/lib/R/library/odesolve/libs/odesolve.so': ld.so.1: R: fatal: relocation error: file /project/scratch/ligroup/R1/lib/R/library/odesolve/libs/odesolve.so: symbol __f90_ssfw: referenced symbol not found Error: package/namespace load failed for 'odesolve' Could any one tell me how to fix this problem? Thanks very much. Wuming __ 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] Polynomial kernel in SVM in e1071 package
Dear list, In some places (for example, http://en.wikipedia.org/wiki/Support_vector_machine) , the polynomail kernel in SVM is written as (u'*v + 1)^d, while in the document of svm() in e1071 package, the polynomial kernel is written as (gamma*u'*v + coef0)^d. I am a little confused here: When doing parameter optimization (grid search or so) for polynomial kernel, does it need to tune four parameters, gamma, coef0, C and degree, or just two of them, C and degree (and fixing gamma to 1 and coef0 = 1)? Thanks, Wuming __ 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] R-2.3.0 make error
Hi Peter, This is mine: AR = ar BLAS_LIBS = C_VISIBILITY = -fvisibility=hidden CC = gcc CFLAGS = -g -O2 -std=gnu99 CPICFLAGS = -fpic CPPFLAGS = -I/usr/local/include CXX = g++ CXXCPP = g++ -E CXXFLAGS = -g -O2 CXXPICFLAGS = -fpic DYLIB_EXT = .so DYLIB_LD = gcc DYLIB_LDFLAGS = -shared DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS) ECHO_C = ECHO_N = -n ECHO_T = F77 = gfortran F77_VISIBILITY = -fvisibility=hidden FC = f95 FCFLAGS = -g -O2 FFLAGS = -g -O2 FLIBS = -lgfortran -lm -lgcc_s FCPICFLAGS = -fpic FPICFLAGS = -fpic JAVA = /usr/bin/java JAVA_HOME = /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre JAVA_LD_LIBRARY_PATH = JAVA_LIBS = -L -ljvm LAPACK_LIBS = -L$(R_HOME)/lib$(R_ARCH) -lRlapack LIBM = -lm LIBR = LIBS = -ldl -lm LIBTOOL = $(SHELL) $(R_HOME)/bin/libtool LDFLAGS = -L/usr/local/lib64 R_ARCH = RANLIB = ranlib SAFE_FFLAGS = -g -O2 -ffloat-store SED = /bin/sed SHELL = /bin/sh SHLIB_CFLAGS = SHLIB_CXXFLAGS = SHLIB_CXXLD = g++ SHLIB_CXXLDFLAGS = -shared SHLIB_EXT = .so SHLIB_FCLD = f95 SHLIB_FCLDFLAGS = -shared SHLIB_FFLAGS = SHLIB_LD = gcc SHLIB_LDFLAGS = -shared SHLIB_LIBADD = SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LDFLAGS) TCLTK_CPPFLAGS = TCLTK_LIBS = On 02 May 2006 08:51:21 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: Wuming Gong [EMAIL PROTECTED] writes: Dear Peter, $ uname -a Linux bl3 2.6.15-1.1833_FC4smp #1 SMP Wed Mar 1 23:55:52 EST 2006 x86_64 x86_64 x86_64 GNU/Linux When ./configure, I did not claim any options... Wuming Hm. Which are your compilers? I have (in etc/Makeconf). AR = ar BLAS_LIBS = C_VISIBILITY = -fvisibility=hidden CC = gcc CFLAGS = -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m64 -mtune=nocona CPICFLAGS = -fpic CPPFLAGS = -I/usr/local/include CXX = g++ CXXCPP = g++ -E CXXFLAGS = -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m64 -mtune=nocona CXXPICFLAGS = -fpic DYLIB_EXT = .so DYLIB_LD = gcc DYLIB_LDFLAGS = -shared DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS) ECHO_C = ECHO_N = -n ECHO_T = F77 = gfortran F77_VISIBILITY = -fvisibility=hidden FC = f95 FCFLAGS = -g -O2 FFLAGS = -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m64 -mtune=nocona FLIBS = -lgfortran -lm -lgcc_s FCPICFLAGS = -fpic FPICFLAGS = -fpic JAVA = /usr/bin/java JAVA_HOME = /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre JAVA_LD_LIBRARY_PATH = JAVA_LIBS = -L -ljvm LAPACK_LIBS = -L$(R_HOME)/lib$(R_ARCH) -lRlapack LIBM = -lm LIBR = LIBS = -ldl -lm LIBTOOL = $(SHELL) $(R_HOME)/bin/libtool LDFLAGS = -L/usr/local/lib64 R_ARCH = RANLIB = ranlib SAFE_FFLAGS = -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m64 -mtune=nocona -ffloat-store SED = /bin/sed SHELL = /bin/sh SHLIB_CFLAGS = SHLIB_CXXFLAGS = SHLIB_CXXLD = g++ SHLIB_CXXLDFLAGS = -shared SHLIB_EXT = .so SHLIB_FCLD = f95 SHLIB_FCLDFLAGS = -shared SHLIB_FFLAGS = SHLIB_LD = gcc SHLIB_LDFLAGS = -shared SHLIB_LIBADD = SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LDFLAGS) TCLTK_CPPFLAGS = -I/usr/include -I/usr/include -I/usr/X11R6/include TCLTK_LIBS = -L/usr/lib64 -ltcl8.4 -L/usr/lib64 -ltk8.4 -L/usr/X11R6/lib64 -lX11 On 01 May 2006 19:30:48 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: Wuming Gong [EMAIL PROTECTED] writes: Dear list, When compiling the R-2.3.0 on FC4 x86_64, I got the following errors: make[3]: Entering directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main' gcc -Wl,--export-dynamic -L/usr/local/lib64 -o R.bin Rmain.o CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o graphics.o identical.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o model.o names.o objects.o optim.o optimize.o options.o par.o paste.o pcre.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o regex.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o ../unix/libunix.a ../appl/libappl.a ../nmath/libnmath.a -lgfortran -lm -lgcc_s ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a -lreadline -lncurses -ldl -lm ../appl/libappl.a(cmplxblas.o)(.text+0x1100a): In function `zrotg_': /project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5579: undefined reference to `z_abs' ../appl/libappl.a(cmplxblas.o)(.text+0x11069):/project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5585: undefined reference to `z_abs' ../appl
[R] R-2.3.0 make error
Dear list, When compiling the R-2.3.0 on FC4 x86_64, I got the following errors: make[3]: Entering directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main' gcc -Wl,--export-dynamic -L/usr/local/lib64 -o R.bin Rmain.o CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o graphics.o identical.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o model.o names.o objects.o optim.o optimize.o options.o par.o paste.o pcre.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o regex.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o ../unix/libunix.a ../appl/libappl.a ../nmath/libnmath.a -lgfortran -lm -lgcc_s ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a -lreadline -lncurses -ldl -lm ../appl/libappl.a(cmplxblas.o)(.text+0x1100a): In function `zrotg_': /project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5579: undefined reference to `z_abs' ../appl/libappl.a(cmplxblas.o)(.text+0x11069):/project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5585: undefined reference to `z_abs' ../appl/libappl.a(cmplxblas.o)(.text+0x11079):/project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5585: undefined reference to `z_abs' ../appl/libappl.a(cmplxblas.o)(.text+0x110de):/project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5586: undefined reference to `z_abs' ../appl/libappl.a(cmplxblas.o)(.text+0x11146):/project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5586: undefined reference to `z_abs' ../appl/libappl.a(cmplxblas.o)(.text+0x1116e):/project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5588: more undefined references to `z_abs' follow collect2: ld returned 1 exit status make[3]: *** [R.bin] Error 1 make[3]: Leaving directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main' make[2]: *** [R] Error 2 make[2]: Leaving directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main' make[1]: *** [R] Error 1 make[1]: Leaving directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src' make: *** [R] Error 1 Is there any way to fix this problem? Thanks, Wuming __ 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] R-2.3.0 make error
Dear Peter, $ uname -a Linux bl3 2.6.15-1.1833_FC4smp #1 SMP Wed Mar 1 23:55:52 EST 2006 x86_64 x86_64 x86_64 GNU/Linux When ./configure, I did not claim any options... Wuming On 01 May 2006 19:30:48 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: Wuming Gong [EMAIL PROTECTED] writes: Dear list, When compiling the R-2.3.0 on FC4 x86_64, I got the following errors: make[3]: Entering directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main' gcc -Wl,--export-dynamic -L/usr/local/lib64 -o R.bin Rmain.o CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o graphics.o identical.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o model.o names.o objects.o optim.o optimize.o options.o par.o paste.o pcre.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o regex.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o ../unix/libunix.a ../appl/libappl.a ../nmath/libnmath.a -lgfortran -lm -lgcc_s ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a -lreadline -lncurses -ldl -lm ../appl/libappl.a(cmplxblas.o)(.text+0x1100a): In function `zrotg_': /project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5579: undefined reference to `z_abs' ../appl/libappl.a(cmplxblas.o)(.text+0x11069):/project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5585: undefined reference to `z_abs' ../appl/libappl.a(cmplxblas.o)(.text+0x11079):/project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5585: undefined reference to `z_abs' ../appl/libappl.a(cmplxblas.o)(.text+0x110de):/project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5586: undefined reference to `z_abs' ../appl/libappl.a(cmplxblas.o)(.text+0x11146):/project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5586: undefined reference to `z_abs' ../appl/libappl.a(cmplxblas.o)(.text+0x1116e):/project/scratch3/ligroup/wuming/src/R-2.3.0/src/appl/cmplxblas.f:5588: more undefined references to `z_abs' follow collect2: ld returned 1 exit status make[3]: *** [R.bin] Error 1 make[3]: Leaving directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main' make[2]: *** [R] Error 2 make[2]: Leaving directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main' make[1]: *** [R] Error 1 make[1]: Leaving directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src' make: *** [R] Error 1 Is there any way to fix this problem? Hmm... It's not happening to me on a similar setup $ uname -a Linux janus 2.6.16-1.2096_FC4smp #1 SMP Wed Apr 19 16:01:54 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux gcc -Wl,--export-dynamic -L/usr/local/lib64 -o R.bin Rmain.o CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o graphics.o identical.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o model.o names.o objects.o optim.o optimize.o options.o par.o paste.o pcre.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o regex.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o ../unix/libunix.a ../appl/libappl.a ../nmath/libnmath.a -lblas -lgfortran -lm -lgcc_s ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a -lreadline -lncurses -ldl -lm Apparently, you are configuring without a BLAS library, but it is not like I get into trouble by removing them from my setup. I'm puzzled. You might check whether you need to upgrade something in your system. -- 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 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman
[R] Sub-vector
Dear list, Given a vector of logical values, say a - c(TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE) Are there any R functions that can tell whether there are two or more TRUE in a row in this vector? Thanks, Wuming __ 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] R package for computing state path using Viterbi algorithm
Dear list, This question is about Hidden Markov Model. Given a transition matrix, an emission matrix and a sequence of observed symbols (actually, nucleotide sequences, A, T, C and G), I hope to predict the sequence of state by Viterbi algorithm. I searched R repository for related packages. msm package has function viterbi.msm (as well as very good document), but it only works for continuous-time condition. Other two HMM related packages, hmm.discnp and repeats, however, does not have such a function (similar to hmmviterbi() function in MatLab). Is there an R package that implements such a function? Thanks, Wuming __ 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] Can anyone please tell me how to strip the white spaces from a character vector?
Try trim() in gdata package. Wuming On 10/25/05, roger bos [EMAIL PROTECTED] wrote: for example: a$tic[1:10] [1] AIR ABCB ABXA ACMR ADCT ADEX [7] ABM AFCE AG ATG Can anyone please tell me how to strip the white spaces from a$tic? Thanks, Roger [[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-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] R-help Digest, Vol 31, Issue 9
?summary.lm and check the Value section. Wuming On 9/10/05, Ping Yao [EMAIL PROTECTED] wrote: Hi: I use lm (linear model) to analyze 47 variables , 8 responses So I use loop to finish it . I want the program to show the results that P-value is less than 0.05. How can I cite the P-valus from lm result ? Ping The code: #using LM to model general fati for (j in 48:52) { for (i in 3:46){ gen.fat-y_x[,j] gen.fat-as.numeric(gen.fat) snp_marker-y_x[,i] x-colnames(y_x) #snp_marker-as.matrix(snp_marker) #mode(snp_marker) cat(phenotype is = ,x[j] , \n) cat(snp marker is = ,x[i] , \n) zz-summary(lm.D9 - lm(gen.fat~snp_marker)) print(zz) return } } [[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-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] R-help Digest, Vol 31, Issue 9
Hi Ping, You can use zz$coefficients[,4] to get the p values for each estimated coefficients in your context. Wuming On 9/11/05, Ping Yao [EMAIL PROTECTED] wrote: Wuming: Thanks for your help. I use the fuction: call(fstatistic,zz) call(p-value,zz) I can get each variable P-values,but I can't get P-value of the model. How can I do ? one of the results is following : Call: lm(formula = gen.fat ~ snp_marker) Residuals: Min 1Q Median 3Q Max -10.5455 -3.0481 0.4545 3.9519 6.9519 Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept)13.0481 0.4518 28.881 2e-16 *** snp_markerallele2 0.5107 0.9102 0.561 0.5753 snp_markerBoth 1.4974 0.6927 2.162 0.0318 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.607 on 212 degrees of freedom Multiple R-Squared: 0.02166,Adjusted R-squared: 0.01244 F-statistic: 2.347 on 2 and 212 DF, p-value: 0.0981 I use the code : zz-summary(lm.D9 - lm(gen.fat~snp_marker)) coe-coef(lm.D9)# the bare coefficients if (coe[2]=.05||coe[3]=.05||coe[4]=.05||coe[5]=.05) { cat(phenotype is = ,x[j] , \n) cat(snp marker is = ,x[i] , \n) sign-call(fstatistic,zz) call(p-value,zz) #print(coe) print(zz) } On 9/10/05, Wuming Gong [EMAIL PROTECTED] wrote: ?summary.lm and check the Value section. Wuming On 9/10/05, Ping Yao [EMAIL PROTECTED] wrote: Hi: I use lm (linear model) to analyze 47 variables , 8 responses So I use loop to finish it . I want the program to show the results that P-value is less than 0.05. How can I cite the P-valus from lm result ? Ping The code: #using LM to model general fati for (j in 48:52) { for (i in 3:46){ gen.fat-y_x[,j] gen.fat-as.numeric(gen.fat) snp_marker-y_x[,i] x-colnames(y_x) #snp_marker-as.matrix(snp_marker) #mode(snp_marker) cat(phenotype is = ,x[j] , \n) cat(snp marker is = ,x[i] , \n) zz-summary( lm.D9 - lm(gen.fat~snp_marker)) print(zz) return } } [[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-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] Too long to display problem
Dear list, I used read.xls in gdata package to read a worksheet in which certain field contains very long character strings (nucleotides sequence, nchar 10,000). Then, the values in these fields are automatically converted to TOO LONG TO DISPLAY. How can I get those original characters instead of TOO LONG TO DISPLAY? Thanks, Wuming __ 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] Too long to display problem
Dear list, Please ignore this thread - the TOO LONG TO DISPLAY is brought by another tool when parsing data sets. Sorry for this ... Wuming On 9/8/05, Wuming Gong [EMAIL PROTECTED] wrote: Dear list, I used read.xls in gdata package to read a worksheet in which certain field contains very long character strings (nucleotides sequence, nchar 10,000). Then, the values in these fields are automatically converted to TOO LONG TO DISPLAY. How can I get those original characters instead of TOO LONG TO DISPLAY? Thanks, Wuming __ 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] Calculating Goodman-Kurskal's gamma using delta method
Dear list, I have a problem on calculating the standard error of Goodman-Kurskal's gamma using delta method. I exactly follow the method and forumla described in Problem 3.27 of Alan Agresti's Categorical Data Analysis (2nd edition). The data I used is also from the job satisfaction vs. income example from that book. job - matrix(c(1, 3, 10, 6, 2, 3, 10, 7, 1, 6, 14, 12, 0, 1, 9, 11), nrow = 4, ncol = 4, byrow = TRUE, dimnames = list(c( 15,000, 15,000 - 25,000, 25,000 - 40,000, 40,000), c(VD, LD, MS, VS))) The following code is for calculating gamma value, which is consistent with the result presented in section 2.4.5 of that book. C - 0 D - 0 for (i in 1:nrow(job)){ for (j in 1:ncol(job)){ pi_c - 0 pi_d - 0 for (h in 1:nrow(job)){ for (k in 1:ncol(job)){ if ((h i k j) | (h i k j)){ pi_c - pi_c + job[h, k]/sum(job) } if ((h i k j) | (h i k j)){ pi_d - pi_d + job[h, k]/sum(job) } } } C - C + job[i, j] * pi_c D - D + job[i, j] * pi_d } } gamma - (C - D) / (C + D) # gamma = 0.221 for this example. The following code is for calculating stardard error of gamma. sigma.squared - 0 for (i in 1:nrow(job)){ for (j in 1:ncol(job)){ pi_c - 0 pi_d - 0 for (h in 1:nrow(job)){ for (k in 1:ncol(job)){ if ((h i k j) | (h i k j)){ pi_c - pi_c + job[h, k]/sum(job) } if ((h i k j) | (h i k j)){ pi_d - pi_d + job[h, k]/sum(job) } } } phi - 4 * (pi_c * D - pi_d * C) / (C + D)^2 sigma.squared - sigma.squared + phi^2 } } se - (sigma.squared/sum(job))^.5 # 0.00748, which is different from the SE 0.117 given in section 3.4.3 of that book. I am not able to figure out what is the problem with my code... Could anyone point out what the problem is? Thanks. Wuming __ 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] Gamma for ordinal trends
Dear list, Are there any functions for calculating gamma (and its standard error), which measures the association of ordinal factors in I x J contingency table. I did a RSiteSearch but did not find any clues... Thanks, Wuming __ 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] Gamma for ordinal trends
Is it possible to use delta method to evaluate the standard error of Goodman-Kruskal gamma and then Wald test to evaluate the significance of association? Wuming On 31 Aug 2005 13:42:27 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: Jonathan Baron [EMAIL PROTECTED] writes: On 08/31/05 17:46, Wuming Gong wrote: Dear list, Are there any functions for calculating gamma (and its standard error), which measures the association of ordinal factors in I x J contingency table. I did a RSiteSearch but did not find any clues... You have to look for Goodman-Kruskal gamma. It is a bit obscure. It is rcorr.cens in the Hmisc package. The significance test is the same as for Kendall's tau, according to some books. Well, it would be if we handled ties in Kendall's tau correctly... I don't know about standard error. -- 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 __ 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] NA when using read.csv
Hi Haibo, Are there any character # in the cells? By default, the things at the right side of the character # will be masked as comments. Wuming On 8/2/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 8/1/05, Haibo Huang [EMAIL PROTECTED] wrote: Hi, when I used: Dist=read.csv(test.csv,header=TRUE) to read data from CSV file. For some cells, R mistakenly put in as NA, while most of the cells still Its not likely that there are errors in this software so its probably not a mistake but some other cause. appears to be right, and there is no error message in R. I am pretty sure the csv file is all right, but just can't figure out what went wrong. Can someone share your thoughts with me? Thanks! Read the posting guide at the bottom of each post. In particular, cut down the input file to a few lines that still exhibit the problem in order to provide a reproducible example. As an aside note that 'header = TRUE' is the default in read.csv (but not on read.table) so you don't need to specify it. __ 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-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 find the significant differences among interactions in logit model?
Hi, I have a question about interpret the results from logistic regression model. I used a dataset from the book Categorical Data Analysis (2nd Edition) by Alan Agresti. summary(crabs) color spine width satell weightpsat 2:12 1: 37 Min. :21.0 Min. : 0.000 Min. :1200 Mode :logical 3:95 2: 15 1st Qu.:24.9 1st Qu.: 0.000 1st Qu.:2000 FALSE:62 4:44 3:121 Median :26.1 Median : 2.000 Median :2350 TRUE :111 5:22 Mean :26.3 Mean : 2.919 Mean :2437 3rd Qu.:27.7 3rd Qu.: 5.000 3rd Qu.:2850 Max. :33.5 Max. :15.000 Max. :5200 crabs.glm - glm(psat ~ color*width, family=binomial(), data=crabs) summary(crabs.glm) Call: glm(formula = psat ~ color * width, family = binomial(), data = crabs) Deviance Residuals: Min 1Q Median 3Q Max -2.0546 -0.9129 0.5285 0.8140 1.9657 Coefficients: Estimate Std. Error z value Pr(|z|) (Intercept) -1.75261 11.46409 -0.1530.878 color3-8.28735 12.00363 -0.6900.490 color4 -19.76545 13.34251 -1.4810.139 color5-4.10122 13.27532 -0.3090.757 width 0.106000.42656 0.2480.804 color3:width 0.312870.44794 0.6980.485 color4:width 0.752370.50435 1.4920.136 color5:width 0.094430.50042 0.1890.850 (Dispersion parameter for binomial family taken to be 1) Null deviance: 225.76 on 172 degrees of freedom Residual deviance: 183.08 on 165 degrees of freedom AIC: 199.08 Number of Fisher Scoring iterations: 5 Note the predictors are mixture of continuous data and categorical data. Here, I wonder whether there is *significant difference* among the four interactions of color and width (say, to get a p-value). In a two-way ANOVA, we may do a F-test. But is there an equivalent method for logit model? Thanks, Wuming __ 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 'stepAIC' selects?
Hi Veronika, StepAIC does not do any test. But you may do a likelihood ratio test on the difference between deviance of two models to judge which model to use, simply like this, 1 - pchisq(deviance.i - deviance.j, df.i - df.j) And then check whether the returned p value is small enough... Wuming On 6/18/05, Bkony Veronika [EMAIL PROTECTED] wrote: Dear all, Could anyone please tell me how 'step' or 'stepAIC' works? Does it simply select the model with the smallest AIC from all the possible models? Or does it perform any test eg. whether the decrease in information content between a model with a given predictor and another without it is significant? Thanks for help! VB __ 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-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] logistic regressioin - course ornotes
Hi Stephen, I think the tutorial written by Brett Presnell (http://web.stat.ufl.edu/~presnell/Teaching/sta4504-2000sp/R/) is a good start point for categorical data analysis using R. Wuming On 6/10/05, Stephen Choularton [EMAIL PROTECTED] wrote: Hi I am using R for logistic regression and finding it very useful. However, I wondered if anyone could point me to any course or notes on this subject using R. All help most welcome. Stephen -- Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. [[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-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 plot a fitted smooth line on histograms?
You may check the chapter 8 Probability distributions in An Introduction to R. Wuming On 5/22/05, Hu Chen [EMAIL PROTECTED] wrote: for example, x - read.table(); here x is a vector containing my data to be analyzed. hist(x,plot=TRUE,breaks=200) then I got a histogram graph. However, How can't get a smooth curve based on the histogram cells to show out the outline? Thanks very much. __ 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-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] covariance analysis by using R
You may fit the model using lm() directly - R will set up a coding for qualitative predictor automatically (taking experiments as qualitative predictor). HTH Wuming On 5/18/05, [EMAIL PROTECTED] wrote: Hello sir: Here's a question on covariance analysis which needs your help. There're 3 experiments,and x refers to control while y refers to experimental result. The purpose is to compare the y values across the 3 experiments. experiment_1: x:0.1 0.2 0.3 0.4 0.5 y:0.5 0.6 0.6 0.7 0.9 experiment_2: x:1 2 3 4 5 y:3 4 6.5 7.5 11 experiment_3: x:10 20 30 40 50 y:18 35 75 90 98 Apparently,the control(x) isn't at the similar level so that we can't compare the y directly through ANOVA. We must normalize y via x in order to eliminate the influence of different level of x. The method of normalize I can get is covariance analysis,since x is the covariant of y. My question is: How to perform covariance analysis by using R? After this normalization,we can get the according normalized y of every original y. All in all,the normalized y of every original y is what I want indeed. Thanks a lot! My best regards! -- *** Xin Meng Capitalbio Corporation National Engineering Research Center for Beijing Biochip Technology Microarray and Bioinformatics Dept. Research Engineer Tel: +86-10-80715888/80726868-6364/6333 Fax: +86-10-80726790 [EMAIL PROTECTED] Address:18 Life Science Parkway, Changping District, Beijing 102206, China __ 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-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 can I estimate parameters of probability distributions?
Hi list, I have a group of data. It looks like they follow a exponential distribution. In R, how can I esimate lamda, that is the rate in pexp, of the distribution and can I use Kolmogorov-Smirnov for hypothesis testing in such a situation? I have read the 8.2 Examing the distribution of a set of data of An Introduction to R but I did not find any clues on this issue. (The data is in the attachment). Thanks Wuming divergence 0.157894736842105 0 0.111 0.222 0.0556 0 0.389 0 0 0.111 0.267 0 0.117647058823529 0.294117647058823 0.105263157894737 0.105263157894737 0.571428571428571 0.142857142857143 0.4 0.133 0.6 0.1 0.333 0.167 0.210526315789474 0.157894736842105 0.111 0.278 0.333 0 0 0.333 0.25 0.125 0.0526315789473685 0 0.176470588235294 0.176470588235294 0.0588235294117647 0.411764705882353 0.571428571428571 0.285714285714286 0.0526315789473685 0.0526315789473685 0 0.667 0 0.444 0.0526315789473685 0.0526315789473685 0.176470588235294 0.294117647058823 0.467 0.267 0.117647058823529 0.176470588235294 0.0667 0.667 0 0.278 0.157894736842105 0 0.333 0.333 0.5 0.0625 0 0.4 0 0.0588235294117647 0.117647058823529 0.117647058823529 0.222 0 0.105263157894737 0.0526315789473685 0.111 0 0.0526315789473685 0 0 0.882352941176471 0 0.235294117647059 0.0667 0.333 0.285714285714286 0.714285714285714 0.357142857142857 0.0714285714285714 0.117647058823529 0 0.5 0 0.0556 0.111 0.0526315789473685 0 0.2 0.533 0.333 0.333 0.894736842105263 0 0.125 0 0.167 0.278 0.411764705882353 0.0588235294117647 0.6875 0.0625 0 0.647058823529412 0.823529411764706 0 0.111 0.0556 0 0.0625 0.736842105263158 0.0526315789473685 0.0714285714285714 0.642857142857143 0 0.411764705882353 0 0.0526315789473685 0.636363636363636 0.0909090909090909 0.556 0 0.181818181818182 0.545454545454545 0.428571428571429 0.428571428571429 0.105263157894737 0.0526315789473685 0.117647058823529 0.0588235294117647 0.6 0.2 0.5 0.0625 0.470588235294118 0.117647058823529 0.0526315789473685 0.105263157894737 0 0 0.167 0 0.0588235294117647 0 0.0526315789473685 0.105263157894737 0.545454545454545 0.363636363636364 0 0.111 0.389 0.0556 0 0.133 0 0.0556 0.0588235294117647 0.0588235294117647 0.5625 0 0 0.5625 0.1875 0.0625 0.157894736842105 0.0526315789473685 0 0.352941176470588 0.0556 0.0556 0.230769230769231 0.230769230769231 0.333 0.167 0.470588235294118 0 0.222 0 0 0.167 0.667 0.111 0.0625 0.4375 0.117647058823529 0 0.75 0 0.267 0.133 0 0.647058823529412 0.105263157894737 0.0526315789473685 0 0.636363636363636 0.235294117647059 0.176470588235294 0 0.235294117647059 0.4375 0 0.736842105263158 0.0526315789473685 0 0.778 0 0.583 0.235294117647059 0.117647058823529 0.1875 0.0625 0.0526315789473685 0.105263157894737 0 0.8125 0.727272727272727 0.0909090909090909 0.235294117647059 0 0.0556 0 0.389 0 0.222 0.0556 0.25 0 0.181818181818182 0.545454545454545 0 0.467 0.125 0.75 0.125 0.1875 0.294117647058823 0 0.153846153846154 0.230769230769231 0 0.235294117647059 0.25 0.625 0 0 0 0.8125 0.105263157894737 0.210526315789474 0.0909090909090909 0.363636363636364 0.117647058823529 0.411764705882353 0.0714285714285714 0 0 0.278 0 0.461538461538462 0.4 0 0 0.0526315789473685 0 0 0.125 0 0.578947368421053 0 0.333 0 0.411764705882353 0.0588235294117647 0.428571428571429 0 0.117647058823529 0.235294117647059 0.0588235294117647 0 0.111 0.444 0.153846153846154 0.538461538461538 0.111 0 0 0.0556 0.25 0 0 0.263157894736842 0.263157894736842 0 0.722 0 0.0588235294117647 0.0588235294117647 0.0588235294117647 0.235294117647059 0.25 0.625 0.333 0.167 0.0588235294117647 0.117647058823529 0 0.389 0.125 0 0.0556 0.0556 0 0 0.421052631578947 0 0.176470588235294 0.117647058823529 0.0556 0 0.125 0.0625 0.631578947368421 0.105263157894737 0 0.0526315789473685 0 0.778 0.428571428571429 0.0714285714285714 0.25 0.5 0.111 0.0556 0.5 0.142857142857143 0.6875 0 0.235294117647059 0 0.0556 0.333 0.5 0 0 0.111 0.0526315789473685 0.0526315789473685 0.210526315789474 0.105263157894737 0 0.4375 0.875 0 0.1 0.05 0.714285714285714 0.0714285714285714 0.0556 0.0556
[R] How can I generate a random network with given cluster coefficient using R?
Hi list, I have read the mannual of package graph, but it looks that three functions randomEGraph, randomGraph and randomNodeGraph cannot generate a random network with given cluster coefficient. Is there any exisiting R package for such kind job and if no, how can I perform this job with existing graph package? Thanks Wuming __ [EMAIL PROTECTED] 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 can I generate a random network with given cluster coefficient using R?
Hi list, I have read the mannual of package graph, but it looks that three functions randomEGraph, randomGraph and randomNodeGraph cannot generate a random network with given cluster coefficient. Is there any exisiting R package for such kind job and if no, how can I perform this job with existing graph package? Thanks Wuming __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html