[R] R-code for carrying out step-wise panel regression

2014-10-21 Thread Amarjit Singh
Dear all For one of my empirical research investigation,  I tried to carry out step-wise panel regression analysis by making adaptation in the use of plm package (since stepAIC command does not work with plm). Say, I tried to regress an explained variable (DEP) on 3 explanatory variables (EX1, E

[R] command for plm

2014-10-18 Thread Amarjit Singh
Dear allI am trying to carry out step-wise panel regression analysis by making adaptation in the use of plm package. Say, I am trying to regress the explained variable (DEP) on 3 explanatory variables (EX1, EX2, EX3) using a panel data set (dat). Of course, the required set of instructions would

[R] How to define a number of matrices through loops

2011-04-08 Thread Amarjit Singh Sethi
Hi all I need to deal with a number (say, 5) of diferent ordered matrices  simultaneously in my computational work. I tried to define these matrices through looping, but got an error message: row <- c(3,4,6,4,5) mt <- c() for (i in 1:5){  mt[i] <- matrix(nrow=row[i],ncol=4) } mt Kindly help Y

Re: [R] Repetitive correlation test

2008-10-25 Thread Amarjit Singh Sethi
44 (0)20 8525 0696 > http://www.burns-stat.com > (home of S Poetry and "A Guide for the Unwilling S > User") > > Amarjit Singh Sethi wrote: > > Dear all, > > Through the following code, I wanted to perform > correlation test repetedly (through loop) on different

[R] Repetitive correlation test

2008-10-24 Thread Amarjit Singh Sethi
Dear all, Through the following code, I wanted to perform correlation test repetedly (through loop) on different combinations of variables of a data set. Code: x=read.table("sample.txt",header=T,sep="\t") out="corout.txt" sink(out) nm = names(x) print(nm) nvr=3 # nvr=Total no. of variables in th

Re: [R] Getting names of variables without quotes

2008-10-21 Thread Amarjit Singh Sethi
MAIL PROTECTED]> wrote: > From: Dieter Menne <[EMAIL PROTECTED]> > Subject: Re: [R] Getting names of variables without quotes > To: [EMAIL PROTECTED] > Date: Sunday, 19 October, 2008, 9:29 PM > Amarjit Singh Sethi yahoo.co.in> > writes: > > (Please do not use ta

Re: [R] Getting names of variables without quotes

2008-10-19 Thread Amarjit Singh Sethi
   4       7 3  10      5       2 4    8      6       6"),header=TRUE) closeAllConnections() # --- # Regression models # --- # Combinations library(forward) comb=t(fwd.combn(colnames(mydata),2)) # Summaries res=apply(comb,1,function(x){ y1=mydata[,x[1]] x1=

[R] Getting names of variables without quotes

2008-10-18 Thread Amarjit Singh Sethi
  Dear R-helpers, hello I am seeking your help in somehow getting names of variables without quotes (" "). Let us say, we have a table with 3 variables V1, V2 and V3. After the table is read, I get names of the variables (thro' the following code) as under quotes (like "V1" rather than the

[R] Iterative estimation of linear regression model

2008-10-15 Thread Amarjit Singh Sethi
Dear all I am intrested in making iterative estimation (thro' loop statements) of, say, linear regression model. For this purpose, I have written the following programme and that I have made use of a sample data (viz., exp.txt):   Programme:   # Linear regression modelling with sample data (try5.

[R] Suitable package for carrying out sigma and beta convergence in panel data

2008-05-28 Thread Amarjit Singh Sethi
availbaility of suitable package(s)/ code in the language. Can any one help me in letting me know of appropriate package/procedural steps to undertake the anlaysis. Kindly let me know as well, format of the input data file for such a package.   Regards   Amarjit Singh Sethi Bollywood, fun

[R] Importing data in text file into R

2008-05-23 Thread amarjit singh sethi
Dear all, I am quite new to R; facing certain problems: Say, I have a text file( named as "try"): YearC1 C2 C3 C4 C5 C6 Y1 3.5 13.89.5 6.8 0.4 24.2 Y2 3.8 13.99.9 7.6 0.7 12.8 Y3 4.5 14.514.29.2 0.6