similar to: what's wrong with my "gls"? it does not allocate memory... even for the simplest AR1 model...

Displaying 20 results from an estimated 2000 matches similar to: "what's wrong with my "gls"? it does not allocate memory... even for the simplest AR1 model..."

2005 Apr 15
1
AR1 in gls function
Dear R-project users I would like to calculate a linear trend versus time taking into account a first order autoregressive process of a single time series (e.g. data$S80 in the following example) using th gls function. gls(S80 ~ tt,data=data,corAR1(value, form, fixed)) My question is what number to set in the position of value within corAR1? Should it be the acf at lag 1? I look forward for
2012 Oct 18
4
speeding read.table
R 2.15.1 OS X Colleagues, I am reading a 1 GB file into R using read.table. The file consists of 100 tables, each of which is headed by two lines of characters. The first of these lines is: TABLE NO. 1 The second is a list of column headers. For example: TABLE NO. 1 COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10
2006 Dec 14
5
Better way to change the name of a column in a dataframe?
Hello R users -- If I have a dataframe such as the following, named "frame" with the columns intended to be named col1 through col6, > frame col1 col2 cmlo3 col4 col5 col6 [1,] 3 10 2 6 5 7 [2,] 6 8 4 10 7 1 [3,] 7 5 1 3 1 8 [4,] 10 6 5 4 9 2 and I want to correct or otherwise change the
2013 Jan 03
5
splitting matrices
Dear useRs, i want to split a matrix having 1116rows and 12 columns. i want to split that matrix into 36 small matrices each having 12 columns and 31 rows. The big matrix should be splitted row wise. which means that the first small matrix should copy values which are in first 31 rows and 12 columns of the big matrix. similarly 2nd small matrix should contain values from 32nd to 63rd row of the
2013 Jan 02
4
list of matrices
dear useRs, i have a list containing 16 matrices. i want to calculate the column mean of each of them. i tried >sr <- lapply(s,function(x) colMeans(x, na.rm=TRUE)) but i am getting the following error >Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric can it be done in any other way? and why i am getting this error?? thanks in advance.. elisa [[alternative
2005 May 02
4
"apply" question
Dear R users, I??ve got a simple question but somehow I can??t find the solution: I have a data frame with columns 1-5 containing one set of integer values, and columns 6-10 containing another set of integer values. Columns 6-10 contain NA??s at some places. I now want to calculate (1) the number of values in each row of columns 6-10 that were NA??s (2) the sum of all values on columns 1-5
2012 Nov 23
6
Summary statistics for matrix columns
Hi, is there a way I can calculate a summary statistics for a columns matrix let say we have this matrix x <- matrix(sample(1:8000),nrow=100) colnames(x)<- paste("Col",1:ncol(x),sep="") if I used summary summary(x) i get the output for each column but I need the output to be in matrix with rownames and all the columns beside it this how I want it
2016 Dec 20
2
colnames for data.frame could be greatly improved
Hello, colnames seems to be not optimized well for data.frame. It escapes processing for data.frame in if (is.data.frame(x) && do.NULL) return(names(x)) but only when do.NULL true. This makes huge difference when do.NULL false. Minimal edit to `colnames`: if (is.data.frame(x)) { nm <- names(x) if (do.NULL || !is.null(nm)) return(nm) else
2011 Aug 25
2
replicate lines of data frame
Greetings! I am just now learning to use R for my dissertation project. I need to manipulate a lot of text and numeric data. I created a data frame that has 7 columns and 127 unique rows. Now I need to replicate each line 6 times and then later change values in the first 2 columns. I am trying to figure out how to accomplish this. I think that I need to use rep(my.df, each=6) but it does
2005 Mar 23
2
replace values in a matrix subject to boolean condition
Hi everybody! I am sorry to bother you with a question so simple but I think there might be a better solution: I have a matrix of size 360x501 where I want to check the value of each 5th column of each row and replace it (and the 6th, 7th, 8th column) by zero if the value is less than 1000. I have written a double loop to do that but that requires a lot of time. Is there a faster way to
2012 Feb 15
1
neuralnet problem
Hello List ! I'm a bright new R user, and I encounter a problem when trying to use the neuralnet package. I have a training set with 8 inputs, and there are 3 outputs (I need 3 distinct neurones as output). Although I read the examples, and the package article, I don't know how to tell R there are 3 outputs (3 outputs neurones). Here is my actual code : # All = input data All <-
2006 Nov 30
4
Quicker way of combining vectors into a data.frame
Hi, In a function, I compute 10 (un-named) vectors of reasonable length (4471 in the particular example I have to hand) that I want to combine into a data frame object, that the function will return. This is very slow, so *I'm* doing something wrong if I want it to be quick and efficient, though I'm not sure what the best way to do this would be. I know it is the combining into data
2006 Mar 28
1
weights in glm (PR#8720)
Full_Name: Robert Pusz Version: 2.2.1 OS: Windows Submission from: (NULL) (157.25.9.126) Hello, In my opinion something is wrong with 'weights' option in glm. My code is following: ###begin of the code#### cl <- c(5012, 106, 3410, 5655, 1092, 1513, 557, 1351, 3133, 2063, 3257, 4179, 5582, 5900, 8473, 4932, 3463, 5596, 2262, 0, 2638, 1111, 4881, 4211, 6271, 5257, 6926, 6165, 0, 0,
2007 Jan 06
1
help with gls
Hello R-users, I am using gls function in R to fit a model with certain correlation structure. The medol as: fit.a<-gls(y~1,data=test.data,correlation=corAR1(form=~1|aa),method="ML") mu<-summary(fit.a)$coefficient With the toy data I made to test, the estimate of mu is exactly equal to the overall mean of y which can not be true. But, if I make a toy data with y more than two
2012 Jul 27
1
overlaying a set of 'grouping' lines on a plot from image()
Hi, I have a matrix that I am displaying via image. I would like to obtain an image where the columns are 'grouped' (I have a grouping variable). But I am not sure how how I can draw the lines to indicate the grouping in the margin. I realize this is essentially waht heatmap does but as I have a set of custom breaks and colors I wanted to generate this via image. I can see that it is a
2006 Jul 13
1
Extracting Phi from gls/lme
I am trying to extract into a scalar the value of Phi from the printed output of gls or lme using corAR1 correlation. ie I want the estimate of the autocorrelation. I can't see how to do this and haven't seen it anywhere in str(model.lme). I can get all the other information - fixed and random effects etc. Is there an obvious way so that I can save the brick wall some damage? TIA
2011 Mar 29
1
lme:correlationstructure AR1 and random factor
Dear helpers, I tried these models to run in the package nlme, but allways got the same error message... I have a correlation in 5 sessions within a field (n=12) with ten traps in one field. res2a <- lme(response~x+y+z+treatment),correlation = corARMA(form = ~ session|trapfield, p = 1, q = 0), random=~1|field, na.action=na.omit, data=plates, method="ML") res2a <-
2004 Sep 03
0
ML vs. REML with gls()
Hello listmembers, I've been thinking of using gls in the nlme package to test for serial correlation in my data set. I've simulated a sample data set and have found a large discrepancy in the results I get when using the default method REML vs. ML. The data set involves a response that is measured twice a day (once for each level of a treatment factor). In my simulated data set, I
2008 Oct 13
0
correlation structure in gls or lme/lmer with several observations per day
Hi, To simplify, suppose I have 2 observations each day for three days. I would like to define the correlation structure of these 6 observations as follows: the correlation of 2 observations on the same day is, say, alpha, the correlation for 2 observations one day apart is rho and the correlation for 2 observations 2 days apart is rho^2. I.e. I would like to have an AR1 correlation + a
2004 Dec 29
3
gls model and matrix operations
Dear List: I am estimating a gls model and am having to make some rather unconventional modifications to handle a particular problem I have identified. My aim is to fit a GLS with an AR1 structure, obtain the variance-covariance matrix (V), modify it as needed given my research problem, and then reestimate the GLS by brute force using matrix operations. All seems to be working almost perfectly,