Displaying 20 results from an estimated 1000 matches similar to: "problem with se.contrast()"
2002 Jan 18
2
Replacing data.frame values
Hello,
I have two data frames, NameAndConc.df and
WhichOnes.df. NameAndConc.df has two columns, the
first column is the names of some material, and the
second column is the concentration of active
ingredient.
> NameAndConc.df
name conc
1 material1 0.8
2 material2 0.5
3 material3 0.4
WhichOnes.df has two columns, each of which specifies
which material.
> WhichOnes.df
2008 Mar 07
1
Finding Interaction and main effects contrasts for two-way ANOVA
I've tried without success to calculate interaction and main effects
contrasts using R. I've found the functions C(), contrasts(),
se.contrasts() and fit.contrasts() in package gmodels. Given the url
for a small dataset and the two-way anova model below, I'd like to
reproduce the results from appended SAS code. Thanks. --Dale.
## the dataset (from Montgomery)
twoway <-
2010 Feb 27
1
Newbie help with ANOVA and lm.
Would someone be so kind as to explain in English what the ANOVA code (anova.lm) is doing? I am having a hard time reconciling what the text books have as a brute force regression and the formula algorithm in 'R'. Specifically I see:
p <- object$rank
if (p > 0L) {
p1 <- 1L:p
comp <- object$effects[p1]
asgn <-
2006 Mar 13
1
anova.mlm (single-model case) does not handle factors? (PR#8679)
Full_Name: Yves Rosseel
Version: 2.2.1
OS: i686-pc-linux-gnu
Submission from: (NULL) (157.193.116.152)
Dear developers,
For the single-model case, the anova.mlm() function does not seem to handle
multi-parameter predictors (eg factors) correctly. A toy example illustrates the
problem:
Y <- cbind(rnorm(100),rnorm(100),rnorm(100))
A <- factor(rep(c(1,2,3,4), each=25))
fit <- lm(Y ~ A)
2006 Sep 27
1
histogram colors in lattice
I have code that constructs a plot using the lattice package that looks
something like the following toy example:
library(lattice)
Start <- factor(rbinom(100,1,.5))
Answer <- 2 - rbinom(100,1,.7)
histogram(~Answer | Start,
breaks=c(1, 1.4 ,1.6,2),
scales=list(x=list(at=c(1.2,1.8),labels=c("Yes","No"))),
xlab="",ylab="")
2004 Feb 01
1
error in building R-1.9.0 sources under Win32
I am trying to compile the R-dev sources on WinXP using mingw 3.1.0-1
and fpTeX 0.7. In the past I
have been able to build the sources fine but now I receive an error in
the process that I havent seen reported on the list before. Everything
works fine until I get to 'make docs'. I now get the message below while
building the R-admin manual (refman.pdf builds fine) and the make
process
1999 Aug 30
3
model.matrix()
Hi,
In R I get the following:
> x <- 1:9
> f <- as.factor(1:9)
> i <- model.matrix(~x+f)
>
> attr(i, "assign")
[1] 0 1 2 2 2 2 2 2 2 2
whereas in S I get the following:
> attr(i, "assign")
$"(Intercept)":
[1] 1
$x:
[1] 2
$f:
[1] 3 4 5 6 7 8 9 10
Has anybody written a model.matrix function to get the same
result as S?
2006 Mar 15
2
difftime arguments
Hi
I just started using RGui.exe under widnows.
I have a text file containing date arranged in columns and rows, each column has the same format, each row with different formats. 3 of the columns are something like this 1/12/2006 3:59:45 PM
I need to calculate the different in seconds between 2 selected periods using their row’s index
My solution:
Read the file in a data frame and
2005 Jan 17
1
merge data frames taking mean/mode of multiple macthes
Hello :)
I have two data frames, one has properties taken on a
piece by piece basis and the other has performance on
a lot by lot basis. I wish to combine these two data
frames but the problem is that each lot has multiple
pieces and hence i need to take a mean of the
properties of multiple pieces and match it to the row
having data about the lot.
I was wondering if there is a simple commmand,
2005 May 05
6
Need some quick help with lattice - barchart
For the following code below, the x-axis ticks are 1,2,3,4,5,6,7 when I was expection them to be 1,2,8,9,10,11,12. Please help me figure out where is the mistake.
library(lattice)
testdata <- as.data.frame(t(structure(c(
1,2005,9.24,6.18,634,
2,2005,8.65,6.05,96,
8,2004,6.81,6.51,16,
9,2004,9.0,7.29,8,
10,2004,8.84,6.18,524,
11,2004,8.54,6.35,579,
12,2004,9.97,6.3,614,
12,2005,8.75,5.84,32,
2006 Sep 25
1
apply: new behaviour for factors in R-2.4.0
Dear R-core
There is a different output for the apply function due to the
change of unlist as mentioned in the R news.
Newly, applying as.factor() (or factor()) in
str(dat <- data.frame(x = 1:10, f1 = gl(2,5,labels = c("A", "B"))))
(d1 <- apply(dat,2,as.factor))
newly returns a character matrix while in R-2.3.1 the same
command resulted in an integer matrix that was
2015 Aug 05
1
Samba4 not able to write to group writeable folder???
Hi...
With samba4 I sometimes feel like a bloody beginner even I use samba
since ages.
Miracle of the day: Users connecting using samba4 cannot write to group
writeable folders even they should be able to.
I upgraded one 3.6 fileserver to 4.2.3. PDC is always a samba 4.2.3
instance. I am using samba4 in classic PDC mode for a couple of reasons.
On my fileserver I have a folder called
2007 Jun 19
2
Preconditions for a variance analysis
Hello everbody,
i'm currently using the anova()-test for a small data.frame of 40
rows and 2 columns. It works well, but is there any preconditions for
a valid variance analysis, that i should consider?
Thank you for your answer,
Daniel
2005 Apr 21
3
Need help with R date handling and barchart with errorbars
Hi All..
Have a question.. For the following r code
testdata <- as.data.frame(t(structure(c(
"1/1/04","LV1",3.8,2,87,
"2/1/04","LV1",3.2,3,28,
"3/1/04","LV1",3.4,3,88,
"4/1/04","LV1",3,2,26,
"5/1/04","LV1",3.8,2,87,
"6/1/04","LV1",3.2,3,28,
2007 May 13
2
extracting text contained in brackets ("[ ... ]") from a character string?
I have a text string that contains text within two brackets.
e.g. "testdata[3]" "testdata[-4]", "testdata[-4g]",
I wish to "extract" the string enclosed in brackets?
What is a good way to do this?
e.g.
fun(testdata[3]) = '3'
fun(testdata[-4g]) = '-4g'
---------------------------------
Moody friends. Drama queens. Your life?
2012 Mar 20
2
Reshaping data from long to wide without a "timevar"
Hello All,
I was wondering if it's possible to reshape data from long to wide in R without using a "timevar". I've pasted some sample data below along with some code. The data are sorted by Subject and Drug. I want to transpose the Drug variable into multiple columns in alphabetical order.
My data have a variable called "RowNo" that functions almost like a
2003 Sep 23
2
confusion about what to expect?
In playing around with data.frames (and wanting a simple, cheap way to
use the variable and case names in plots; but I've solved that with
some hacks, yech), I noticed the following behavior with subsetting.
testdata <- data.frame(matrix(1:20,nrow=4,ncol=5))
names(testdata) ## expect labels, get them
names(testdata[2,]) ## expect labels, get them
names(testdata[,2]) ## expect labels, but
2009 Mar 06
2
Interaction term not significant when using glm???
Dear all,
I have a dataset where the interaction is more than obvious, but I was asked
to give a p-value, so I ran a logistic regression using glm. Very funny, in
the outcome the interaction term is NOT significant, although that's
completely counterintuitive. There are 3 variables : spot (binary response),
constr (gene construct) and vernalized (growth conditions). Only for the FLC
construct
2006 Apr 25
1
summary.lme: argument "adjustSigma"
Dear R-list
I have a question concerning the argument "adjustSigma" in the
function "lme" of the package "nlme".
The help page says:
"the residual standard error is multiplied by sqrt(nobs/(nobs -
npar)), converting it to a REML-like estimate."
Having a look into the code I found:
stdFixed <- sqrt(diag(as.matrix(object$varFix)))
if (object$method
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