Displaying 20 results from an estimated 245 matches for "tension".
2018 Jan 07
2
SpreadLevelPlot for more than one factor
Dear Ashim,
Try spreadLevelPlot(breaks ~ interaction(tension, wool), data=warpbreaks) .
I hope this helps,
John
-----------------------------
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
Web: socialsciences.mcmaster.ca/jfox/
> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behal...
2008 Dec 12
2
Extracting the name of an object into a character string and vice versa
I am still struggling to map a character string to an object name and
vice versa in R.
I thought the as.name() function might work, but observe the following
behaviour ...
> attach(warpbreaks)
> levels(tension)
[1] "L" "M" "H"
> levels(as.name("tension"))
NULL
> objectname<-as.name("tension")
> objectname
tension
> levels(objectname)
NULL
So even though it sets up a symbol, this symbol isn't recognised as an
object name by functions s...
2018 Jan 09
0
SpreadLevelPlot for more than one factor
Dear Sir,
Many thanks for your reply.
I have a query.
I have a whole set of distributions which should be made normal /
homoscedastic. Take for instance the warpbreaks data set.
We have the following boxplots for the warpbreaks dataset:
a. boxplot(breaks ~ wool)
b. boxplot(breaks ~ tension)
c. boxplot(breaks ~ interaction(wool,tension))
d. boxplot(breaks ~ wool @ each level of tension)
e. boxplot(breaks ~ tension @ each level of wool)
Now should we not be making a-e normal and homoscedastic? Should we not
make a giant collection of boxplots from a-e and use the SpreadLevelPlot on
th...
2018 Jan 14
1
SpreadLevelPlot for more than one factor
Dear Ashim,
I?ll address your questions briefly but they?re really not appropriate for
this list, which is for questions about using R, not general statistical
questions.
(1) The relevant distribution is within cells of the wool x tension
cross-classification because it?s the deviations from the cell means that
are supposed to be normally distributed with equal variance. In the
warpbreaks data there are only 9 cases per cell. If you examine all of
these deviations simultaneously, that?s equivalent to examining the
residuals from the...
2012 Nov 29
2
Deleting certain observations (and their imprint?)
...g which.. or subset..) but an imprint of the deleted observations seem to remain, even though they have 0 observations. This is causing me problems later on. I'll use the dataset warpbreaks to illustrate, I apologize if this isn't in the best format
##Summary of warpbreaks suggests three tension levels (H, M, L)
> summary(warpbreaks)
breaks wool tension
Min. :10.00 A:27 L:18
1st Qu.:18.25 B:27 M:18
Median :26.00 H:18
Mean :28.15
3rd Qu.:34.00
Max. :70.00
## Subset the dataset and keep only those...
2018 Jan 07
2
SpreadLevelPlot for more than one factor
Dear All,
I want a transformation which will make the spread of the response at all
combinations
of 2 factors the same.
See for example :
boxplot(breaks ~ tension * wool, warpbreaks)
The closest I can do is :
spreadLevelPlot(breaks ~tension , warpbreaks)
spreadLevelPlot(breaks ~ wool , warpbreaks)
I want to do :
spreadLevelPlot(breaks ~tension * wool, warpbreaks)
But I get :
> spreadLevelPlot(breaks ~tension * wool , warpbreaks)
Error in spreadLeve...
2009 Jan 14
3
Casting lists to data.frames, analog to SAS
I have a specific question and a general question.
Specific Question: I want to do an analysis on a data frame by 2 or more
class variables (i.e., use 2 or more columns in a dataframe to do
statistical classing). Coming from SAS, I'm used to being able to take a
data set and have the output of the analysis in a dataset for further
manipulation. I have a data set with vote totals, with one
2005 May 15
3
adjusted p-values with TukeyHSD?
hi list,
i have to ask you again, having tried and searched for several days...
i want to do a TukeyHSD after an Anova, and want to get the adjusted
p-values after the Tukey Correction.
i found the p.adjust function, but it can only correct for "holm",
"hochberg", bonferroni", but not "Tukey".
Is it not possbile to get adjusted p-values after
2007 Aug 14
4
Problem with "by": does not work with ttest (but with lme)
...ilcoxon test). However, the by-function works fine with the lme function.
Did I just miss something or is it really not working? If not, is there any other possibility to avoid loops?
Thanks
Daniel
Here is the R help example for "by"
require(stats)
attach(warpbreaks)
by(warpbreaks, tension, function(x) lm(breaks ~ wool, data = x))
*->works great
by(warpbreaks,tension,function(x)t.test(breaks ~ wool,data=warpbreaks,paired = TRUE))
*Same output for each level of tension:
tension: L
Paired t-test
data: breaks by wool
t = 1.9956, df = 26, p-value = 0.05656
alternative hypothesis:...
2001 Sep 05
3
Bug in ftable?? (Was: Two-way tables of data, etc)
...en Murray Jorgensen and Brian Ripley,
it seems to me better to choose tabulations that will not come and bite
you. Suppose your data are sligtly irregular, e.g. (for the sake of
the argument):
data( warpbreaks )
warpbreaks$variant <- rep( 1:5, len=54 )
attach( warpbreaks )
tb <- table( wool, tension, variant )
tb
# in this case you would like to see:
tp <- tapply( breaks, list( wool, tension, variant ), mean )
tp
# and hardly:
ftable( xtabs( breaks ~ wool + tension + variant ) )
# It would be nice to flatten the tabulations, so I tried:
ftable( tb )
tp <- as.table( tp )
ftable( tp )...
2001 Sep 05
3
Bug in ftable?? (Was: Two-way tables of data, etc)
...en Murray Jorgensen and Brian Ripley,
it seems to me better to choose tabulations that will not come and bite
you. Suppose your data are sligtly irregular, e.g. (for the sake of
the argument):
data( warpbreaks )
warpbreaks$variant <- rep( 1:5, len=54 )
attach( warpbreaks )
tb <- table( wool, tension, variant )
tb
# in this case you would like to see:
tp <- tapply( breaks, list( wool, tension, variant ), mean )
tp
# and hardly:
ftable( xtabs( breaks ~ wool + tension + variant ) )
# It would be nice to flatten the tabulations, so I tried:
ftable( tb )
tp <- as.table( tp )
ftable( tp )...
2010 May 11
1
Splines under tension
Does anyone know if R has a function for splines under tension. I know there
are numerous packages for spline interpolation within R i just can't find
one that lets you determine the tension factor.
Any help would be much appreciated!
Sam
--
View this message in context: http://r.789695.n4.nabble.com/Splines-under-tension-tp2173887p2173887.html
Sent fro...
2018 Jan 07
0
SpreadLevelPlot for more than one factor
...es,
Ashim
On Sun, Jan 7, 2018 at 10:37 AM, Ashim Kapoor <ashimkapoor at gmail.com> wrote:
> Dear All,
>
> I want a transformation which will make the spread of the response at all
> combinations
> of 2 factors the same.
>
> See for example :
>
> boxplot(breaks ~ tension * wool, warpbreaks)
>
> The closest I can do is :
>
> spreadLevelPlot(breaks ~tension , warpbreaks)
> spreadLevelPlot(breaks ~ wool , warpbreaks)
>
> I want to do :
>
> spreadLevelPlot(breaks ~tension * wool, warpbreaks)
>
> But I get :
>
> > spreadLevelPl...
2010 May 18
2
how to select rows per subset in a data frame that are max. w.r.t. a column
...nse that I can
easily select the maximal values per subset using "aggregate", but I can't
really figure out how to select the rows in the original data frame that are
associated with these maximal values.
library(stats)
# this returns the list with maximal values for breaks per wool/tension
subset
maxValues = aggregate(warpbreaks$breaks, list(wool = wool, tension =
tension), max)
# now i'd like the subset of the rows in warpbreaks that are associated with
these maximal values
Thank you in advance!
Tim.
[[alternative HTML version deleted]]
2012 May 16
1
TukeyHSD plot error
Hi, I am seeking help with an error when running the example from R
Documentation for TukeyHSD. The error occurs with any example I run, from
any text book or website. thank you...
> plot(TukeyHSD(fm1, "tension")).
Error in plot(confint(as.glht(x)), ylim = c(0.5, n.contrasts + 0.5), ...) :
error in evaluating the argument 'x' in selecting a method for function
'plot': Error in UseMethod("vcov") :
no applicable method for 'vcov' applied to an object of class "...
2012 Oct 23
1
How Rcmdr or na.exclude blocks TukeyHSD
...oblem, you can either exit Rcmdr before calling TukeyHSD or you can set na.action to na.omit. The code below demonstrates the situation.
Cheers,
Bob
data(warpbreaks)
head(warpbreaks)
# Introduce a missing value:
warpbreaks$breaks[1] <- NA
head(warpbreaks)
# Do a model:
fm1 <- aov(breaks ~ tension, data = warpbreaks)
TukeyHSD(fm1, "tension", ordered = TRUE)
# Setting na.exclude or starting Rcmdr will kill the confidence intervals:
options(na.action = na.exclude)
fm1 <- aov(breaks ~ tension, data = warpbreaks)
TukeyHSD(fm1, "tension", ordered = TRUE)
# Setting na.omit...
2007 Sep 06
3
Warning message with aggregate function
Dear all,
When I use aggregate function as:
attach(warpbreaks)
aggregate(warpbreaks[, 1], list(wool = wool, tension = tension), sum)
The results are right but I get a warning message:
"number of items to replace is not a multiple of replacement length."
BTW: I use R version 2.4.1 in Ubuntu 7.04.
Your kind solutions will be great appreciated.
Best wishes
Yours, sincerely,
Xingwang Ye
2006 Oct 27
0
glht for aov with Error() term
...t possible to build together a model and term component myself,
so that glht will work for repeated measurements ANOVAs? If so, how
would I do that?
Best regards,
Michael Zehetleitner
For example (senseless, but it makes the point):
--------- snip -------------
> amod <- aov(breaks ~ tension, data = warpbreaks)
> amod.err <- aov(breaks ~ tension + Error(wool/tension), data =
warpbreaks)
>
> class(amod)
[1] "aov" "lm"
> class(amod.err[["wool:tension"]])
[1] "aov" "lm"
>
> names(amod)
[1] "coefficients&qu...
2012 Jul 27
1
Understanding the intercept value in a multiple linear regression with categorical values
...-5.778
I'm able to understand that the value of intercept is the mean value
of breaks when wool equals "A", and that adding up the "woolB"
coefficient to the intercept value I get the mean value of breaks when
wool equals "B". However, if I also consider the tension variable in
the model, I'm unable to figure out the meaning of the intercept
value:
> lm(breaks ~ wool + tension, data=warpbreaks)
Call:
lm(formula = breaks ~ wool + tension, data = warpbreaks)
Coefficients:
(Intercept) woolB tensionM tensionH
39.278 -5.778...
2012 Jun 13
1
Tukey Kramer with ANOVA (glm)
Hello,
I am performing a BACI analysis with ANOVA using the following glm:
fit1<-glm(log(Cucs_m+1)~(BA*Otter)+BA+Otter+ID+Primary, data=b1)
The summary(aov(fit1)) shows significance in the interaction; however, now I
would like to determine what combinations of BA and Otter are significantly
different (each factor has two levels). ID and PRIMARY substrates are
categorical and included in