similar to: Significance of trend

Displaying 20 results from an estimated 1000 matches similar to: "Significance of trend"

2009 Dec 30
2
select elements and transpose
Hi all, Given the following, > xx [[1]] V1 V2 V3 [1,] 1 2 3 [2,] 4 5 6 [3,] 7 8 9 [[2]] V1 V2 V3 [1,]10 11 12 [2,]13 14 15 [3,]16 17 18 [[3]] V1 V2 V3 [1,]19 20 21 [2,]22 23 24 [3,]25 26 27 how do i extract elements in each file so that after transpose, it looks something like the following; 1 10 19 2 11 20 3 12 21 and so on.. Thanks.. -- Muhammad
2009 Dec 27
3
Scaling error
Hi useRs, I ran into an inconsistent output problem again. Here is the simplify illustration I've got a matrix as follows > x V1 V2 V3 [1,] 1 2 3 [2,] 4 5 6 [3,] 7 8 9 Associated with the matrix is a scaling factor, sca, derived from, say the mean of the respective columns, V1-V3; > sca V1 V2 V3 2.5 1.7 3.6
2009 Apr 05
4
extract the p value of F statistics from the lm class
Dear R users I have run an regression and want to extract the p value of the F statistics, but I can find a way to do that. x<-summary(lm(log(RV2)~log(IV.m),data=b)) Call: lm(formula = log(RV2) ~ log(IV.m), data = b[[11]]) Residuals: Min 1Q Median 3Q Max -0.26511 -0.09718 -0.01326 0.11095 0.29777 Coefficients: Estimate Std. Error t value Pr(>|t|)
2009 Dec 04
2
Standard deviation for each element in a set of matrices
Hello R-users, I would like to know how to find the standard deviation for each element in a set of matrices. Given the following files, File1 File2 File3 1 1 1 4 4 4 7 7 7 2 2 2 5 5 5 8 8 8 3 3 3 6 6 6 9 9 9 I want to calculate the standard deviation for every cell in the file (I'm using gridded data). The desired output is Output 3 3 3 3 3
2010 Jan 02
1
Question on Reduce + rollmean
Hello useRs, I'd like to perform a moving average on the dataset, xx. I've tried combining the functions Reduce and rollmean but it didn't work. > r <- function(n) rollmean(n, 2) # where 2 = averaging interval > output < - Reduce("r", x) Error in f(init, x[[i]]) : unused argument(s) (x[[i]]) Is there anything wrong with the code in the first place? where
2009 Oct 13
2
Linear Regression Question
Dear Sir or Madam, I am a student at MSc Probability and Finance at Paris 6 University/ Ecole Polytechnique. I am using R and I can't find an answer to the following question. I will be very thankful if you can answer it. I have two vectors rendements_CAC40 and rendements_AlcatelLucent. I use the lm function as follows, and then the sumarry function: regression=lm(rendements_CAC40 ~
2012 Jun 05
1
nls: how do you know if the model is significant?
Hi all, I'm struggling with nls. How do you know if your model is significant? For a lm, you get a p-value, but you don't get it for a nls. Is there a way to calculate it? For a lm I use this: a<-summary(lm(model ~obs)) f.stat<-a$fstatistic p.value<-1-pf(f.stat["value"],f.stat["numdf"],f.stat["dendf"]) Is there something similar for a nls?
2010 Jan 16
2
Drought severity index: Excel to R
Dear all, I'm trying to make an R code for the drought severity index (DSI) developed by Philips and McGregor (1998). You can refer to the description of the algorithm on page 19 from http://dissertations.port.ac.uk/229/01/MaloneS.pdf The code is given in Excel as the following and can be found on page 60 from the same link. C7 = IF(C6<0,IF(@SUM(A6:A1)<0,C6+A6,"0"),
2006 Jun 19
4
Qurey : How to add trendline( st. line) in Graph
How to add trendline (i.e. straight line passing through maximum points) in graph. I have worked on the data given below. Please tell me how to add trendline in the graph. The script is as follows =================================== start ==================================================== # The data is as follows data <- c( 0.01, 0.02, 0.04, 0.13, 0.17 , 0.19 , 0.21 , 0.27 , 0.27 ,
2009 Sep 28
2
Trendline and R square value
Hi I would like to display the trendline and the R-square value in a xy scatter in R. For example if I want to plot f vs g I add the trendline using the commands below >library(quantreg) >plot(f,g) >abline(rq(g~f)) however I don't know how to display the R2 in the graph. Thank you in advance. Kind regards Maria [[alternative HTML version deleted]]
2009 Oct 09
4
Trendline for a subset of data
Dear all, I am using abline(lm ...) to insert a linear trendline through a portion of my data (e.g. dataset[,36:45]). However, I am finding that whilst the trendline is correctly displayed and representative of the data portion I've chosen, the line continues to run beyond this data segment and continues until it intersects the vertical axes at each side of the plot. How do I display the
2010 Jan 08
2
R exponential regression
Hi all, I have a dataset which consists of 2 columns. I'd like to plot them on a x-y scatter plot and fit an exponential trendline. I'd like R to determine the equation for the trendline and display it on the graph. Since I am new to R (and statistics), any advice on how to achieve this will be greatly appreciated. Many thanks, Chris -- View this message in context:
2012 Feb 14
3
execute array of functions
Hi all, I'm trying to get the min and max of a sequence of number using a loop like the folllowing. Can anyone point me to why it doesn't work. Thanks. type <- c("min","max") n <- 1:10 for (a in 1:2) { print(type[a](n)) } -- Muhammad
2011 Sep 24
2
ncdf - install error
Dear all, I'm having issues with the installation of the ncdf package. It returns a non-zero exit status. Can anyone suggest what I should do next? FYI, I do not have problems installing other packages. Thanks. Muhammad * installing *source* package ?ncdf? ... checking for nc-config... /usr/local/bin/nc-config configure: creating ./config.status config.status: creating src/Makevars **
2010 Jan 29
2
Create matrix with subset from unlist
Hello all, I'm trying to create a 2x2 matrix, 32 times after unlist() so that I can convert the list to matrix. I've looked through the R archive but couldn't find the answer. There is what I've done. > f <- system("ls *.txt", intern=TRUE) > x <- lapply(f, read.table) > x [[1]] V1 V2 1 -27.3 14.4 2 29.0 -38.1 [[2]] V1 V2 1 14.4
2009 Dec 07
1
Output multiple files
Hello, I want the ouput to take the name of the original file. I have the following code - but the problem is that the output overrides the original file which I desire not. So given an input file called File1.txt, I want the ouput to be called File1.out.txt, or something along this line. I'm working with many files, fyi. out=c("file1.txt", "file2.txt",
2010 Jan 06
1
Increment in loop
useRs, I'm getting limited success in trying to apply increment in a loop. The following defined function creates a +1 increment incr <- function(x){ eval.parent(substitute(x <- x + 1)) print(x) } How do I apply it in a loop on my test dataset, x1, so that the procedure becomes x1[c(1:2)] x1[c(2:3)] x1[c(3:4)] where x1 = > m <- matrix(1:3,3,3) > x1 <- list(m, m+1,
2011 Jun 18
3
Array
Hi, Can someone advise why the followind did not produce the array, given the condition specified? s <- 1 a1 <- array(dim=c(1,4)) a2 <- array(dim=c(2,4)) arr <- ifelse(s==0,a1,a2) Thanks. Muhammad
2012 Mar 15
1
line plot over a barplot
Dear all, I have data in the following format : X-axis Y-axis <0 10% 0-20 20% 20-40 30% 40-60 40% ......... and so on. I want to plot a bar graph of the above. Also I would want to add a trendline passing either through the center of each bar or through the top. Is it also possible to get the r-squared and p-values for
2010 Apr 22
3
using which to select range of values
Hi all, I would like to get the array index for a range of values, say 0 < x < 1.5. I'm wondering if there is an alternative for the following which I've done x0 <- rnorm(100) x1 <- ifelse(x0 > 0 & x0 < 1.5,"t","f") x2 <- which(x1=="t",arr.ind=TRUE) x0[x2] Thanks. -- Muhammad