similar to: Selecting and then joining data blocks

Displaying 20 results from an estimated 4000 matches similar to: "Selecting and then joining data blocks"

2013 May 02
2
saving a matrix
Hi all, In my data analysis, I have created a random matrix M ( of order 500 X 7). I want to use the same matrix when I start a new session, or suppose I want to send this matrix to one of my friends (because this matrix is randomly generated, and I dont want to use any other 500X7 matrix randomly generated by R). How can I save and call this matrix in the later sessions as well? Appreciate
2013 May 02
2
ARMA with other regressor variables
Hi, I want to fit the following model to my data: Y_t= a+bY_(t-1)+cY_(t-2) + Z_t +Z_(t-1) + Z_(t-2) + X_t + M_t i.e. it is an ARMA(2,2) with some additional regressors X and M. [Z_t's are the white noise variables] How do I find the estimates of the coefficients in R? And also I would like to know what technique R employs to find the estimates? Any help is appreciated. Thanks,
2013 Apr 25
1
Bootstrapping in R
Hi all, 1>i have 3 vectors a,b and c, each of length 25....... i want to define a new data frame z such that z[1] = (a[1] b[1] c[1]), z[2] = (a[2] b[2] c[2]) and so on...how do i do it in R 2> Then i want to draw bootstrap samples from z. Kindly suggest how i can do this in R. Thanks, Preetam -- Preetam Pal (+91)-9432212774 M-Stat 2nd Year,
2013 May 04
2
Lasso Regression error
Hi all, I have a data set containing variables LOSS, GDP, HPI and UE. (I have attached it in case it is required). Having renamed the variables as l,g,h and u, I wish to run a Lasso Regression with l as the dependent variable and all the other 3 as the independent variables. data=read.table("data.txt", header=T) l=data$LOSS h=data$HPI u=data$UE g=data$GDP matrix=data.frame(l,g,h,u)
2016 Apr 30
1
Declaring All Variables as Factors in GLM()
Hi guys, I am running glm(y~., data = history,family=binomial)-essentially, logistic regression for credit scoring (y = 0 or 1). The dataset 'history' has 14 variables, a few examples: history <- read.csv("history.csv". header = TRUE) 1> 'income = 100,200,300 (these are numbers in my dataset; however interpretation is that these are just tags or labels,for every
2013 Apr 27
1
Selecting ridge regression coefficients for minimum GCV
Hi all, I have run a ridge regression as follows: reg=lm.ridge(final$l~final$lag1+final$lag2+final$g+final$u, lambda=seq(0,10,0.01)) Then I enter : select(reg) and it returns: modified HKB estimator is 19.3409 modified L-W estimator is 36.18617 smallest value of GCV at 10 I think it means that it is advisable to
2013 Apr 30
1
ADF test --time series
Hi all, I was running the adf test in R. CODE 1: adf.test(data$LOSS) Augmented Dickey-Fuller Test data: data$LOSS Dickey-Fuller = -1.9864, Lag order = 2, p-value = 0.5775 alternative hypothesis: stationary CODE 2: adf.test(diff(diff(data$LOSS))) Augmented Dickey-Fuller Test data: diff(diff(data$LOSS)) Dickey-Fuller = -6.9287, Lag order = 2, p-value = 0.01 alternative
2013 Apr 26
1
Regression coefficients
Hi all, I have run a ridge regression as follows: reg=lm.ridge(final$l~final$lag1+final$lag2+final$g+final$g+final$u, lambda=seq(0,10,0.01)) Then I enter : select(reg) and it returns: modified HKB estimator is 19.3409 modified L-W estimator is 36.18617 smallest value of GCV at 10 I think it means that it is
2013 May 02
1
warnings in ARMA with other regressor variables
Hi all, I want to fit the following model to my data: Y_t= a+bY_(t-1)+cY_(t-2) + Z_t +Z_(t-1) + Z_(t-2) + X_t + M_t i.e. it is an ARMA(2,2) with some additional regressors X and M. [Z_t's are the white noise variables] So, I run the following code: for (i in 1:rep) { index=sample(4,15,replace=T) final<-do.call(rbind,lapply(index,function(i)
2013 Sep 05
2
binary symmetric matrix combination
Hi, May be this helps: m1<- as.matrix(read.table(text=" y1 g24 y1 0 1 g24 1 0 ",sep="",header=TRUE)) m2<-as.matrix(read.table(text="y1 c1 c2 l17 ?y1 0 1 1 1 ?c1 1 0 1 1 ?c2 1 1 0 1 ?l17 1 1 1 0",sep="",header=TRUE)) m3<- as.matrix(read.table(text="y1 h4??? s2???? s30 ?y1 0 1 1 1 ?h4 1 0 1 1 ?s2 1 1 0 1 ?s30 1 1 1
2013 Apr 29
1
Arma - estimate of variance of white noise variables
Hi all, Suppose I am fitting an arma(p,q) model to a time series y_t. So, my model should contain (q+1) white noise variables. As far as I know, each of them should have the same variance. How do I get the estimate of this variance by running the arma(y) function (or is there any other way)? Appreciate your help. Thanks, Preetam -- Preetam Pal (+91)-9432212774 M-Stat 2nd Year,
2013 Jul 22
4
How to split two levels several times?
Hi, I have a small problem with the function split() and would appreciate your help. I have a table called ?XXX? with 2 columns and 49 rows. The 49 rows belong to 8 different levels (electrode1, ...,electrode8). I want to split the table always at the row where ?electrode1? starts again so that I can export 7 individual dataframes (numbered ?dataframe1? to ?dataframe7?) which contain always
2013 May 09
0
ARMA(p,q) prediction with pre-determined coefficients
I have the following time series model for prediction purposes *Loss_t = b1* Loss_(t-1) + b2*GDP_t + b3*W_(t-1)* where W_t is the usual white noise variable. So this is similar to ARMA(1,1) except that it also contains an extra predictor, GDP at time t. I have only 20 observations on each variable except GDP for which I know till 100 values. And most importantly,I have also calculated
2013 Apr 30
0
Ridge regression
Hi all, I have run a ridge regression on a data set 'final' as follows: reg=lm.ridge(final$l~final$lag1+final$lag2+final$g+final$u, lambda=seq(0,10,0.01)) Then I enter : select(reg) and it returns: modified HKB estimator is 19.3409 modified L-W estimator is 36.18617 smallest value of GCV at 10 I think it
2013 May 03
1
Likelihood
Hi all, I have run a regression and want to calculate the likelihood of obtaining the sample. Is there a way in which I can use R to get this likelihood value? Appreciate your help on this. The following are the details: raw_ols1=lm(data$LOSS~data$GDP+data$HPI+data$UE) summary(raw_ols1) Call: lm(formula = data$LOSS ~ data$GDP + data$HPI + data$UE) Residuals: Min 1Q
2012 Nov 08
5
map two names into one
Thanks. Yes. Your approach can identify: Glaxy ace S 5830 and S 5830 Glaxy ace But you can not identify using same program: Iphone 4S 16 G Iphone 4S 16G How should I solve both in same time. Kind regards,Tammy [[alternative HTML version deleted]]
2013 Jun 18
1
transform 3 numeric vectors empty of 0/1
Dear all, Without a loop, I would like transform 3 numeric vectors empty of 0/1 of same length Vec1 : transform 1 to A and 0 to "" Vec2 : transform 1 to B and 0 to "" Vec3 : transform 1 to C and 0 to "" to obtain only 1 vector Vec who is the paste of the 3 vectors (Ex : ABC, BC, AC, AB,...) Any idea ? Thank you for your help -- Michel ARNAUD
2013 Feb 01
29
cumulative sum by group and under some criteria
Thank you very much for your reply. Your code work well with this example. I modified a little to fit my real data, I got an error massage. Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) : Group length is 0 but data length > 0 On Thu, Jan 31, 2013 at 12:21 PM, arun kirshna [via R] < ml-node+s789695n4657196h87@n4.nabble.com> wrote: > Hi, > Try this: >
2013 Apr 13
2
Comparison of Date format
Hi, ?In the example you provided, it looks like the dates in Date2 happens first.? So, I changed it a bit.? DataA<- read.table(text=" ID,Status,Date1,Date2 ??? ??? ?????? 1,A,3-Feb-01,15-May-01 ??? ??? 1,B,15-May-01,16-May-01 ??? ??? 1,A,16-May-01,3-Sep-01 ??? ??? ??? ??? ??? 1,B,3-Sep-01,13-Sep-01 ??? ??? ??? ??? ??? 1,C,13-Sep-01,26-Feb-04 ??? ??? ??? ??? ???
2013 Apr 12
5
how to change the date into an interval of date?
Hi, I am not sure I understand your question correctly. dat1<- read.table(text=" id??????????? responsed_at???????????????? number_of_connection????????????????? scores 1????????????????? 12-01-2010?????????????????????????????????? 1????????????????????????????????????????????? 2 1????????????????? 15-02-2010??????????????????????????????????