similar to: How to get the minimum ?

Displaying 20 results from an estimated 4000 matches similar to: "How to get the minimum ?"

2005 Jun 03
2
Simplify formula for iterative programming
Dear R-ians, I am looking for the simplification of a formula to improve the calculation speed of my program. Therefore I want to simplify the following formula: H = Si (Sj ( sqrt [ (Ai - Aj)?? + (Bi - Bj)?? ] ) ) where: A, B = two vectors (with numerical data) of length n sqrt = square root Si = summation over i (= 0 to n) Sj = summation over j (= 0 to n) Ai = element of A with index i Aj
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
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 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
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
2005 Aug 02
1
plotting 3 functions on same graph
hi all, I wish to draw on the same graphic device 3 functions. But i don't want them to be on different graph, i want to compare them on the same I don't need mfrow or mfcol, I need something else... 1 graph on 1 device inside this graph 3 ploted function. I saw something unsing data.frame, but i think it's overkill, and something less complicated must exist, if not why? why not
2006 Jan 30
2
Type II SS for fixed-effect in mixed model
Hi In mixed-model with lme() How can I obtain Type II SS or Type III SS for fixed effect? Thanks Julien
2006 Feb 01
1
Randomised Block Design
Hi, I'm studying math, and i have to make an analysys using Randomised Block Design. I have two factors, i know how to do this in Statistica, but how to do this in R, i read some manuals but the only thing that i have found was 2 factor ANOVA. Please could someone help me, or give some usefull links ?? Krzytsztof Suwada
2006 Feb 20
1
Extracting variance components from lmer
Hi All. I need a bit of help extracting the residual error variance from the VarCorr structure from lmer. #Here's a 2-way random effects model lmer.1 <- lmer(rating ~ (1|person)+(1|rater), data = dat) #Get the structure vc.fit <- VarCorr(lmer.1) #results in..... $person 1 x 1 Matrix of class "dpoMatrix" (Intercept) (Intercept) 0.7755392 $rater 1 x 1 Matrix
2006 Sep 23
1
contrasts in aov
useRs, A no doubt simple question, but I am baffled. Indeed, I think I once knew the answer, but can't recover it. The default contrasts for aov (and lm, and...) are contr.treatment and contr.poly for unordered and ordered factors, respectively. But, how does one invoke the latter? That is, in a data.frame, how does one indicate that a factor is an *ordered* factor such that
2006 Nov 15
1
how to compute p-value?
Hi all, I just want to understand how R computes p-value in a simple linear regression model? The reason is that in Matlab in the function which "evaluate standard errors for multivariate normal regression", it just provide estimates and standard errors, without giving out p-value, It computes t-statistics as follows: abs(beta_hat/std_beta_hat) how to go further to get p-value?
2005 Nov 23
1
Find main effect in 2-way ANOVA
Hi, I use anova() to find interaction effect and then I need to find data with main effect from those data with interaction effect. How to do that? I used : anova(lm(data~factor1*factor2)), then select data with interaction effect. Then I need to select those data also with main effect of factor1 or factor2, from previous selected data. How to do that? Many thanks for your time on my
2005 May 10
2
filename
Hey, I'm generating a .jpeg file for a web application passing parameters to R via cgi. R gets the parameters by using commandArgs, which are passed to a variable named j and z j<-commandArgs()[3] z<-commandArgs()[4] Later I want to use the characters strings of the argument which the variables are holding for my filename, e.g.: jpeg(file="d:/data/images/jz.jpeg",...)
2005 Jun 26
2
is.all.equal
Hi, The description of all.equal states "is.all.equal should be used for programming, typically in if expressions. It is a simple wrapper using identical as shown in the documentation there.", but is.all.equal is not explicitly defined there (although there is a hint in the comments that is.all.equal <- function(x,y) isTRUE(all.equal(x,y))). Could the documentation be corrected? (or
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
2006 Feb 04
1
Mixed models and missing p-value...
Dear R-users, I computed a simple mixed models which was: mod<-lmer(nb ~ site + (1|patelle),tr) The output was: Linear mixed-effects model fit by REML Formula: nb ~ site + (1 | patelle) Data: tr AIC BIC logLik MLdeviance REMLdeviance 1157.437 1168.686 -574.7184 1164.523 1149.437 Random effects: Groups Name Variance Std.Dev. patelle
2006 Jan 18
3
linear contrasts with anova
I have some doubts about the validity of my procedure to estimeate linear contrasts ina a factorial design. For sake of semplicity, let's imagine a one way ANOVA with three levels. I am interested to test the significance of the difference between the first and third level (called here contrast C1) and between the first and the seconda level (called here contrast C2). I used the following
2006 Jul 09
1
KS Test Warning Message
All, Happy World Cup and Wimbledon. This morning finds me with the first of my many daily questions. I am running a ks.test on residuals obtained from a regression model. I use this code: > ks.test(Year5.lm$residuals,pnorm) and obtain this output One-sample Kolmogorov-Smirnov test data: Year5.lm$residuals D = 0.7196, p-value < 2.2e-16 alternative hypothesis: two.sided Warning
2005 Jul 13
1
Name for factor's levels with contr.sum
Good morning, I used in R contr.sum for the contrast in a lme model: > options(contrasts=c("contr.sum","contr.poly")) > Septo5.lme<-lme(Septo~Variete+DateSemi,Data4.Iso,random=~1|LieuDit) > intervals(Septo5.lme)$fixed lower est. upper (Intercept) 17.0644033 23.106110 29.147816 Variete1 9.5819873 17.335324 25.088661 Variete2 -3.3794907 6.816101 17.011692 Variete3
2005 Jul 21
1
Question about 'text' (add lm summary to a plot)
I would like to annotate my plot with a little box containing the slope, intercept and R^2 of a lm on the data. I would like it to look like... +----------------------------+ | Slope : 3.45 +- 0.34 | | Intercept : -10.43 +- 1.42 | | R^2 : 0.78 | +----------------------------+ However I can't make anything this neat, and I can't find out how to combine this