similar to: Writing a function to fit ALSOS models. problem with normalization?

Displaying 20 results from an estimated 3000 matches similar to: "Writing a function to fit ALSOS models. problem with normalization?"

2018 Jun 19
0
Bug 16719: kruskal.test documentation for formula
Thomas Levine writes: > I submit a couple options for addressing bug 16719: kruskal.test > documentation for formula. > https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16719 > > disallow-character.diff changes the documentation and error message > to indicate that factors are accepted. > > allow-character.diff changes the kruskal.test functions to convert >
2008 Nov 12
2
creating a file of p.values
Hi all, I am performing hundreds of kruskal wallis tests and trying to figure out how to create a file of the p.values I obtain. This is the code I use for the tests: A2<-kruskal.test(X2~treatment) A3<-kruskal.test(X3~treatment) A4<-kruskal.test(X4~treatment) A5<-kruskal.test(X5~treatment) A6<-kruskal.test(X6~treatment) A7<-kruskal.test(X7~treatment)
2009 Sep 28
1
model.matrix troubles with AlgDesign
Dear DevelopeRs, in continuing with my suite of packages on experimental design, I am stuck with an issue that appears to be related to package AlgDesign - I have tried to get it solved by Bob Wheeler, but he seems to be stuck as well. Whenever AlgDesign is loaded, some of my code does not work any more. For example, in a fresh R session: require(DoE.base) fac.design(nlevels=c(2,6,2))
2013 Jul 10
1
Kruskal.test
Hi, Please dput() your example dataset. dat1<- read.table(text="a?? a?? a?? a??? a??? b?? b??? b??? c??? c?? c??? c 2? 4??? 5?? 2??? 7??? 2?? 2??? 6??? 3??? 7?? 9??? 3 3? 3?? 4?? 1???? 6??? 8?? 1??? 3??? 5??? 2??? 6??? 3",sep="",header=FALSE,stringsAsFactors=FALSE) library(reshape) ?dat2<-melt(as.data.frame(t(dat1)),id.var="V1")[,-2]
2012 Jan 10
4
2 sample wilcox.test != kruskal.test
Hello, I think I am right in saying that a 2 sample wilcox.test is equal to a 2 sample kruskal.test and a 2 sample t.test is equal to a 2 sample anova. This is also stated in the ?kruskal.test man page: The Wilcoxon rank sum test (wilcox.test) as the special case for two samples; lm together with anova for performing one-way location analysis under normality assumptions; with Student's t
2005 Jan 17
5
find source code
I am using R 2.0.2 on a WinXP I am trying to get the code of the Kruskal-Wallis test but > kruskal.test function (x, ...) UseMethod("kruskal.test") <environment: namespace:stats> > ls(3) [1] "acf" "acf2AR" "add.scope" .............. [181] "kruskal.test" "ks.test"
2010 Feb 24
1
extracting results from wilcox_test (package::coin)
Recently, I ran a series of Kruskal-Wallace tests [kruskal.test()] using by() to group by site Output is a list: >Herb.KW Herb.df$ID: 10-1 Kruskal-Wallis rank sum test data: Indicator_Rating by Year Kruskal-Wallis chi-squared = 15.24, df = 7, p-value = 0.03302 ----------------------------------------------------------------------------------------------------- Herb.df$ID: 18-1
2008 Aug 21
1
Kruskal.test() on lists
Hi, I am trying to do a kruskal wallis test on two lists, fVisited and cSN: fVisited[[1]] [1] 0.17097623 0.30376141 0.17577266 0.14951855 0.03959753 0.08096217 0.05744888 0.02196257.... .... cSN[[1]] [1] 0.08557303 0.36477791 0.19601252 0.12981040 0.05351320 0.10385542 0.03539577 0.03106175.... So if I just want to do a test on just one of the entries this is simple enough:
2013 Jul 09
1
Kruskal.test
Hi, ?kruskal.test() ?a<- c(2,4,5,2,7) ?b<- c(2,2,6) ?c<- c(3,7,9,3) ?kruskal.test(list(a,b,c)) # ?#? Kruskal-Wallis rank sum test # #data:? list(a, b, c) #Kruskal-Wallis chi-squared = 2.003, df = 2, p-value = 0.3673 A.K. Hi I need an expression in R to apply a kruskal.test to this data (for example). a ? a ? a ? a ? ?a ? ?b ? b ? ?b ? ?c ? ?c ? c ? ?c 2 ?4 ? ?5 ? 2 ? ?7 ? ?2 ? 2 ?
2008 Apr 28
1
error in summary.Design
Dear list, after fitting an lrm with the Design package (stored as "mymodel") I try running a summary, but I get the following error: dim(mydata) [1] 235 9 names(mydata) [1] "id" "VAR1" "VAR2" "VAR3" "VAR4" "VAR5" "VAR6" "VAR7" "VAR8" summary(mymodel) Error in `contrasts<-`(`*tmp*`,
2003 Mar 08
0
RE: Text Rotation (was: Take care with codes()!)
You can use the graphics parameter "srt" to rotate displayed text by a specified number of degrees, e.g. srt=45 to put it on an angle, srt=90 to put it vertical. If you do this, may need to modify the call to text to increase ylim and change the plot location to give you more room. I'm working to update the 'balloonplot' function in the gregmisc package now to handle this
2013 Apr 15
1
Kruskal-Wallis
Hi, I have got two groups of samples; and for every row, I wish to calculate Kruskal-Wallis' p-value. In the example below, and the stars (****) show where I am struggling to design and put things together. Any help would be appreciated. myFile <- data.frame(Sample_1a = 1:10, Sample_1b = 2:11, Sample_1c = 3:12, Sample_2a=4:13, Sample_2b=7:16, row.names=LETTERS[1:10]) groups <- rep
2003 Jan 03
1
Take care with codes()! (was type of representation)
Ahh yes, sorry about that. Here's the corrected snippet: # Create an Example Data Frame Containing Car x Color data carnames <- c("bmw","renault","mercedes","seat") carcolors <- c("red","white","silver","green") datavals <- round(rnorm(16, mean=10, sd=4),1) data <- data.frame(Car=rep(carnames,4),
2012 Aug 03
1
Multiple Comparisons-Kruskal-Wallis-Test: kruskal{agricolae} and kruskalmc{pgirmess} don't yield the same results although they should do (?)
Hi there, I am doing multiple comparisons for data that is not normally distributed. For this purpose I tried both functions kruskal{agricolae} and kruskalmc{pgirmess}. It confuses me that these functions do not yield the same results although they are doing the same thing, don't they? Can anyone tell my why this happens and which function I can trust? kruskalmc() tells me that there are no
2010 Jan 27
2
using functions with multiple arguments in the "apply" family
typically, the apply family wants you to use vectors to run functions on. However, I have a function, kruskal.test, that requires 2 arguments. kruskal.test(Herb.df$Score,Herb.df$Year) This easily computes the KW ANOVA statistic for any difference across years.... However, my data has multiple sites on which KW needs to be run... here's the data: Herb.df<-
2003 Mar 08
0
RE: Text Rotation (was: Take care with codes()!)
I've just uploaded gregmisc_0.8.2.tar.gz to CRAN. It should show up in the package repository in a day or two. This version of the gregmisc package provides an enhanced 'balloonplot' function with 'rowsrt', 'colsrt' arguments to control rotation of the labels, and 'rowmar', 'colmar' to control the amount of space reserved for the labels. Here's
2005 Jan 27
1
Is glm weird or am I?
Hi, I've written a script that checks all bivariate correlations for variables in a matrix. I'm now trying to run a logistic regression on each pair (x,y) where y is a factor with 2 levels. I don't know how (or whether I want) to try to fathom what's up with glm. What I wrote is attached. Here's what I get. *****************************************************
2008 Mar 24
2
Newbie help with Sweave
I think I've gotten my Emacs/Sweave/R system set up correctly, thanks to Vincent and Jim, but I haven't been successful getting my first document produced. I'm trying to use one of Friedrich Leisch's examples, http://www.ci.tuwien.ac.at/~leisch/Sweave/example-1.Snw. I cut and pasted the text into a document sweaveexample.Rnw in Emacs. It seemed to be processed successfully with R:
2010 Aug 03
3
Kruskal Walllis test
Hi all My data table (g) contains a continues data column (plant.height) and other columns (columns 8 to 57), each with number of levels of different factors. ANOVA test was done and the p-values were extracted as follos: a <- function(x) anova(lm(plant.height ~ x))$"Pr(>F)"[1] r<- apply(g[,8:57],2,a) If I try to do a Kruskal-Wallis test : kw <- function(x)
2006 Mar 18
0
No subject
Normally `codes' is not the appropriate function to use with an unordered factor. Use `unclass' or `as.numeric' to extract the codes used in the internal representation of the factor, as these do not assume that the codes are sorted. and this is one of the `normally' cases. Your code will only work correctly if the levels are in alphabetical order (in the locale