Displaying 20 results from an estimated 9000 matches similar to: "loop for regression"
2012 Jul 05
3
Return
Hello Every one
I have data on Stock prices and I want to calculate the return on all the
stocks
and then replace all the stock prices with the returns
can any one tell me how to do
My data is in the format given below
Date Stock1 Stock2 Stock3
01/01/2000 1 2 3
01/02/2000 5 6 7
01/03/2000 1 2 3
01/04/2000
2012 Jul 04
1
(no subject)
Hi everyone I
have data on stock prices and market indices
and I need to run a seperate regression of every stock on market
so I want to write a "for loop" so that I wont have to write codes again
and again to run the regression...
my data is in the format given below
Date Stock1 Stock2 Stock3 Market
01/01/2000 1 2 3 4
2012 Jul 05
1
Return on Stock Market
Hello Every one
I have data on Stock prices and I want to calculate the return on all the
stocks
and then replace all the stock prices with the returns
can any one tell me how to do
My data is in the format given below
Date Stock1 Stock2 Stock3
01/01/2000 1 2 3
01/02/2000 5 6 7
01/03/2000 1 2 3
01/04/2000
2012 Aug 02
4
Subseting
Hi everyone
I have banking data set in long format with 4 columns.One of these columns
is bank name which consist of 49 banks and I want the data for only 40
banks out of these 49
so can anyone help me on how to get this 40 banks data
My data looks like
Year Name totalliabilties assets
1990 a 90 10
1991 a 89 48
1992 a 87
2012 Jul 04
2
Date
Hi
I have monthly data and the dates are in MM/YY Format
I need to convert them into DD/MM/YY format by pasting 01 in place of DD to
all the observations in my Year Column
ex:
Year Stock Prices
01/2000 1
02/2000 2
03/2000 3
I need to convert them to
Year Stock Prices
01/01/2000 1
01/02/2000 2
01/03/2000
2012 Jul 18
4
contour
Hello Everyone
I have the data long format and I want to draw the contour plot with it
x1 x2 x3
0 1 2
0 2 1
0 3 5
1 1 4
1 2 2
1 3 3
when I am using contour(x1,x2,x3,col=heat.colors) or fill.contour
its giving me an error that increasing x and y expected
So please tell me what is the right function to draw contour when the data
is not ordered and you cant order
2016 Jan 27
2
rstan warning messages
RHEL 6 installed
R version 3.2.3 from EPEL installed
Start R and use the following command, but got warnings!
install.packages("rstan", dependencies = TRUE, repos = "http://cran.r-project.org/")
...
g++ -m64 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o RcppEigen.so RcppEigen.o RcppExports.o fastLm.o -L/usr/lib64/R/lib -lRlapack -L/usr/lib64/R/lib -lRblas -lgfortran -lm
2012 Aug 07
2
shading line plot
Hi everyone,
I have a time series data set and I want to fill my line plot of this time
series with different colors
e.g
I want to fill portion related to 1995-1996 with blue , portion related to
1996-1997 with orange and then portion related to 1997-1998 with red
can anyone please help me.
[[alternative HTML version deleted]]
2012 Jan 13
1
Portfolio Optimization
Hi,
I'm an R newbie and I've been struggling with a optimization problem for
the past couple of days now.
Here's the problem - I have a matrix of expected payouts from different
stock option strategies. Each column in my matrix represents a different
stock and each row represents the return to the strategy given a certain
market move. So the rows are not a time series of percentage
2012 Aug 30
2
Identifying and Removing NA Columns and factor Columns with more than x Levels
Hi,
How do you subset a dataframe so that you only have columns:
1. that contain one or more NAs?
2. that contain factors with greater than or equal to 32 levels?
How do you remove from a dataframe columns**
3. with one or more NA's?
4. that contain factors with greater than or equal to 32 levels?
** I know how to remove columns at a basic level but I am trying
2015 Nov 23
3
MKL Acceleration encouraging; need adjust package builds?
Dear R-devel:
The Cluster administrators at KU got enthusiastic about testing
R-3.2.2 with Intel MKL when I asked for some BLAS integration. Below
I forward a performance report, which is encouraging, and thought you
would like to know the numbers. Appears to my untrained eye there are
some extraordinary speedups on Cholesky decomposition, determinants,
and matrix inversion.
They had
2017 Apr 27
2
R-3.4.0 and recommended packages
On 27 April 2017 at 12:01, Johannes Ranke wrote:
|
| > so it seems to me this must affect all packages in Debian sid that were
| > built before the release of R 3.4.0!
|
| or rather before 14 April 2017, which is when R from revision r72510 was
| uploaded to sid as pre-release candidate.
Another example with KernSmooth:
> library(KernSmooth)
KernSmooth 2.23 loaded
Copyright
2012 Jul 08
2
Notation for previous observation in a data frame
I've created a data frame in R, but in order to clean up some of the data,
I need to set certain variable observations equal to the value of their
previous observation (it would be conditional, but that part's less
important right now). In Stata, I would simply set var = var[_n-1] in those
cases. What is the R equivalent?
[[alternative HTML version deleted]]
2012 Jun 28
1
Indifference curve
Hello everyone I am new to R
I need to plot 3 indifference curve for the level 100, 200 and 300
my utility function is of the form u(x,y)=3x^2+2y
I also need to draw contour line on it
can any one please tell me how to do it????
[[alternative HTML version deleted]]
2017 Apr 27
2
R-3.4.0 and recommended packages
Am Dienstag, 25. April 2017, 11:21:31 schrieb Dirk Eddelbuettel:
> On 25 April 2017 at 16:11, Johannes Ranke wrote:
> | This looks similar to what I got this morning when I tested my
> | (unreleased)
> | backport of R 3.4.0 to Debian jessie. My test was
> |
> | library(MASS)
> | example(rlm)
> |
> | and there was an object that was not found. I am on a train on the way
2009 Nov 11
1
Help with fPortfolio
Hi
I'm getting the following errors while using the efficientPortfolio function
even though I'm setting the target return to the mean of the TargetReturn I
obtain from the portfolio object created by the feasiblePortfolio function.
First Error:
Error: targetReturn >= min(mu) is not TRUE
Second Error:
Error in .rquadprog(Dmat = args$Dmat, dvec = args$dvec, Amat = args$Amat, :
2017 Oct 21
2
Problem when installing lme4 under Debian stretch
Thanks very much, Dirk! I gave that a try and got the following:
pi at raspberrypi:~ $ sudo apt-get install r-cran-car
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been
2006 Dec 01
3
Make many barplot into one plot
Dear all,
## I have 4 tables like this:
satu <- array(c(5,15,20,68,29,54,84,119), dim=c(2,4),
dimnames=list(c("Negative", "Positive"), c("Black",
"Brown", "Red", "Blond")))
dua <- array(c(50,105,30,8,29,25,84,9), dim=c(2,4),
dimnames=list(c("Negative", "Positive"),
2013 Apr 08
3
Reshaping a table
Hello all,
I have data in the form of a table:
X Y1 Y2
0.1 3 2
0.2 2 1
And I would like to transform in the form:
X Y
0.1 Y1
0.1 Y1
0.1 Y1
0.1 Y2
0.1 Y2
0.2 Y1
0.2 Y1
0.2 Y2
Any ideas how?
Thanks in advance,
IOanna
[[alternative HTML version deleted]]
2017 Oct 21
1
Problem when installing lme4 under Debian stretch
Hi,
apparently you are using the backport of R 3.4.2, which provides r-api-3.4.
With this backport installed, you cannot use the binary packages from the
stretch archive.
> | The following packages have unmet dependencies:
> | r-cran-car : Depends: r-api-3
> |
> | Depends: r-cran-pbkrtest but it is not going to be installed
> | Depends: