search for: anscomb

Displaying 20 results from an estimated 83 matches for "anscomb".

Did you mean: anscombe
2007 Dec 05
1
Working with "ts" objects
...(lm for example) coerce the "ts" object into a data.frame before application with the results that the output is stored in a data.frame object. For example the two sets of code below replicate examples from chapter 2 and 6 in the text. In the first set of code if I were to replace "anscombe<-read.table(fname, header=TRUE)" with "anscombe<-ts(read.table(fname, header=TRUE))" the plot() commands would generate errors. The objects "x1", "y1" ... would not be recognized. In this case I would have to reference the specific column in the anscombe d...
2011 Nov 24
2
proper work-flow with 'formula' objects and lm()
Dear all I have a work-flow issue with lm(). When I use > lm(y1~x1, anscombe) Call: lm(formula = y1 ~ x1, data = anscombe) Coefficients: (Intercept) x1 3.0001 0.5001 I get as expected the formula, "y1 ~ x1", in the print()ed results or summary(). However, if I pass through a formula object > (form <- formula(y1~x1)) y1 ~ x1 > lm(...
2020 Oct 15
0
package(moments) issue
moments::anscombe.test(x) does give errors when x has too few values or if all the values in x are the same > moments::anscombe.test(c(1,2,6)) Error in if (pval > 1) pval <- 2 - pval : missing value where TRUE/FALSE needed > moments::anscombe.test(c(2,2,2,2,2,2,2,2)) Error in if (pval > 1) pval &l...
2020 Oct 15
2
package(moments) issue
...e error message. As I have kurtosis value, it should be fine for the time being. However, in case if you have any other explanation behind the error, I will highly appreciate it. Best wishes, Sania On Thu, 15 Oct 2020 at 20:43, Bill Dunlap <williamwdunlap at gmail.com> wrote: > moments::anscombe.test(x) does give errors when x has too few values or if > all the values in x are the same > > > moments::anscombe.test(c(1,2,6)) > Error in if (pval > 1) pval <- 2 - pval : > missing value where TRUE/FALSE needed > > moments::anscombe.test(c(2,2,2,2,2,2,2,2)) >...
2020 Oct 15
2
package(moments) issue
Hi all, While running the anscombe.test in R, I'm getting an error of *Error in if (pval > 1) pval <- 2 - pval : missing value where TRUE/FALSE needed* for a few time series columns whereas for most of the series the function is working fine. I have checked for those specific columns for missing values. However, there is...
2011 Oct 25
1
alternative option in skewness and kurtosis tests?
I have a question about the D'Agostino skewness test and the Anscombe-Glynn kurtosis test. agostino.test(x, alternative = c("two.sided", "less", "greater")) anscombe.test(x, alternative = c("two.sided", "less", "greater")) The option "alternative" in those two functions seems to be the null hy...
2020 Oct 15
0
package(moments) issue
Another bad case is > moments::anscombe.test(rep(c(1,1.1),length=35)) Error in if (pval > 1) pval <- 2 - pval : missing value where TRUE/FALSE needed I haven't checked the formulas carefully, but I suspect the problem is from taking the cube root of a negative number in z <- (1 - 2/(9 * a) - ((1 - 2/a)/(1 + x...
2005 Apr 29
0
Anscombe-Glynn, Bonett-Seier, D'Agostino
Dear useRs, I was searching CRAN for implementation of kurtosis and skewness tests, and found that there is some kind of lack on it. So, I have written three functions: 1. Anscombe-Glynn test for kurtosis 2. Bonett-Seier test based on Geary's kurtosis (which is not widely known, but I was inspired by original paper describing it, found coincidentally in Elsevier database) 3. D'Agostino test for skewness These three functions are not enough to make another small pa...
2006 Aug 16
3
separate row averages for different parts of an array
I have an array with 44800 columns and 24 rows I would like to compute the row average for the array 100 columns at a time, so I would like to end up with an array of 24 rows x 448 columns. I have tried using apply(dataset, 1, function(x) mean(x[])), but I am not sure how to get it to take the average 100 columns at a time. Any ideas would be welcomed. thanks, Spencer [[alternative HTML
2010 Jun 10
2
points marking
Hi, How to mark points on x axis of a graph keeping x axis as constant and changing y from y1 to y2 respectively. I want to highlight the area from y1 to y2. Any suggestions Thank you Jeet [[alternative HTML version deleted]]
2007 Mar 13
2
turn regression coefficients into matrix or...
I don't have much experience with r. What I am trying to do is to turn regression coefficients (after I run a lm or glm model) into some matrix such that I can do some post-estimation calculation, for example predicted probabilities in glm model, etc.. Or, is there any function in r that I can use to do something along that line? thanks. Jun Xu, Ph.D. Department of Sociology Ball State
2006 Sep 25
1
Rows of a data frame to matrix
useRs, I have a data frame where four of the columns of the data frame represent the values of a two-by-two matrix. I'd like to, row-by-row, go through the data frame and use the four columns, in matrix form, to perform calculations necessary to create new values for variables in the data frame. My first idea was to use apply: apply(as.array(data.frame[,1:4]), 1, matrix, nrow=2) Though
2011 Aug 15
1
update() ignores object
...ame of the term in a regression model that dropterm specifies as the least significant one, and I'm assigning this name to an object. However, when I use update(), it ignores this object. Is there a way I can make it not ignore it? A reproducible example is below: > lm(x1~1+y1*y2+y3+y4,data=anscombe)->my.lm > rownames(dropterm(my.lm,test="F",sort=TRUE))[1]->my.object > my.object [1] "y1:y2" > update(my.lm,.~.-my.object) Call: lm(formula = x1 ~ y1 + y2 + y3 + y4 + y1:y2, data = anscombe) Coefficients: (Intercept) y1 y2 y3...
2007 Aug 26
3
subset using noncontiguous variables by name (not index)
Hi All, I'm using the subset function to select a list of variables, some of which are contiguous in the data frame, and others of which are not. It works fine when I use the form: subset(mydata,select=c(x1,x3:x5,x7) ) In reality, my list is far more complex. So I would like to store it in a variable to substitute in for c(x1,x3:x5,x7) but cannot get it to work. That use of the c function
2006 Aug 29
2
lattice/xyplot: plotting 4 variables in two panels - can this be done?
Hi, I would like to create a plot of y1,y2,y3,y4 against x for several subjects such that y1 and y2 are plotted against x in one panel and y3 and y4 against x in another panel. Thus if there are 3 subjects I should end up with 6 panels. Is there a simple way of doing so (i.e. without calling xyplot() several times, and then padding the results together)?? Regards S?ren
2006 Jul 11
2
R newbie: logical subsets
Hello! I'm a newcomer to R hoping to replace some convoluted database code with an R script. Unfortunately, I haven't been able to figure out how to implement the following logic. Essentially, we have a database of transactions that are coded with a geographic locale and a type. These are being loaded into a data.frame with named variables city, type, and price. E.g., trans$city
2012 Jun 28
4
Printing a variable in a loop
Dear R Users: I'm a STATA user converting to R, and I'd like to be to do the following. #Assign var_1 and var_2 a value 10->var1 20->var2 #Now I'd like to print the values of var_1 and var_2 by looping through var_1 and var_2 in such a manner: while(y<3){ print(var_y) y+1->y } In STATA, the "y" appended to " var_" is called the local variable and
2023 Nov 14
1
data.frame weirdness
What is going on here? In the lines ending in #### the inputs and outputs are identical yet one gives a warning and the other does not. a1 <- `rownames<-`(anscombe[1:3, ], NULL) a2 <- anscombe[1:3, ] ix <- 5:8 # input arguments to #### are identical in both cases identical(stack(a1[ix]), stack(a2[ix])) ## [1] TRUE identical(a1[-ix], a2[-ix]) ## [1] TRUE res1 <- data.frame(stack(a1[ix]), a1[-ix]) #### res2 <- data.frame(stack(a2[ix]), a2[-ix...
2023 Nov 14
1
data.frame weirdness
...3 Best, -Deepayan On Tue, 14 Nov 2023 at 08:23, Gabor Grothendieck <ggrothendieck at gmail.com> wrote: > > What is going on here? In the lines ending in #### the inputs and outputs > are identical yet one gives a warning and the other does not. > > a1 <- `rownames<-`(anscombe[1:3, ], NULL) > a2 <- anscombe[1:3, ] > > ix <- 5:8 > > # input arguments to #### are identical in both cases > > identical(stack(a1[ix]), stack(a2[ix])) > ## [1] TRUE > identical(a1[-ix], a2[-ix]) > ## [1] TRUE > > > res1 <- data.frame(stack(a1[ix]...
2011 Aug 06
1
significance of differences in skew and kurtosis between two groups
Dear R-users, I am comparing differences in variance, skew, and kurtosis between two groups. For variance the comparison is easy: just var.test(group1, group2) I am using agostino.test() for skew, and anscombe.test() for kurtosis. However, I can't find an equivalent of the F.test or Mood.test for comparing kurtosis or skewness between two samples. Would the test just be a 1 df test on the difference in Z or F scores returned by the agostino or anscombe? How are the differences distributed: chi2?...