Re: [R] Urgent :) Output interpretation: standard error of lm dummy variable

2015-05-19 Thread Livia Maria Vestergaard
somewhere and you can help :) Best Livia Fra: Livia Maria Vestergaard Sendt: 19. maj 2015 10:16 Til: r-help@r-project.org Emne: [R] Output interpretation: standard error of lm dummy variable Hi guys I have a statistical question to an analyse I ran in

[R] Output interpretation: standard error of lm dummy variable

2015-05-19 Thread Livia Maria Vestergaard
:) Best Livia __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, repr

Re: [R] lm model exported from R to excel

2015-05-06 Thread Livia Maria Vestergaard
Hi Duncan Thank you so much - it worked :) Best Livia Fra: Duncan Mackay [dulca...@bigpond.com] Sendt: 6. maj 2015 14:26 Til: R; Livia Maria Vestergaard Emne: RE: [R] lm model exported from R to excel Hi Livia There are several html packages that

[R] lm model exported from R to excel

2015-05-06 Thread Livia Maria Vestergaard
Hi all I all. I am wondering whether anybody know how to export an output of an lm model from R to excel in order to have excel recognize the table that comes and divide the numbers in the table into columns and rows? I really hope it is possible? :) Best Livia

Re: [R] LM() and time in R

2015-04-30 Thread Livia Maria Vestergaard
on the price. I know how to tell R about the date by as.Date() , but not with the time, how can I do that? Or do you guys maybe a third idea about what should make a regression about to improve the model? Cheers Livia :) Fra: Boris Steipe [boris.s

[R] LM() and time in R

2015-04-29 Thread Livia Maria Vestergaard
time but how ? Hope that you can help me :) Livia __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

[R] seemingly unrelated regression

2009-04-09 Thread livia
Hello, I am working on the model of seemingly unrelated regression. I came across with the error message: Log determinant of residual covariance: NA Warning messages: NAs generated in: log(x) I have three linear models which contain 21 explanatory variables and there are about 300 data point

[R] Col Names

2009-04-08 Thread livia
Hello, I am working with S-plus TimeSeries Object. I wonder how can I change the column names of the variable instead of using the one default? i.e to change "DEV.MSCI" to other name PositionsDEV.MSCI 04/30/1980 00:00:00.000 -0.0150328542 05/31/1980 00:00:00.000 0.0

[R] linear constraints---absolute value

2008-01-21 Thread livia
Hello, I would like to optimize the function "fqp" as following: a= c(0.2,0.3,0.4) vcov=matrix(c(1,2,3,4,5,6,7,8,9),3,3) fqp <- function(b) {t(b)%*%a-0.5*((t(b)%*%vcov)%*%b)} I want the linear constraint to be something like abs(b1)+ abs(b2)+abs(b3) = 1.5. I found it diffcult to use "constr

[R] Optimization: non-liner constraints

2008-01-15 Thread livia
Hello everyone, I would like to optimize the function "fqp" as following: a=c(0.2,0.3,0.4) vcov=matrix(c(1,2,3,3,2,2,2,3,1),3,3) c=2 fqp <- function(b) {t(b)%*%a-0.5*c*((t(b)%*%vcov)%*%b)} with constraints like ((t(b)%*%vcov)%*%b) <= 0.5 Is there a function of doing it? Many thanks. -- View t

[R] linearly constrained Optimization

2008-01-15 Thread livia
Hello everyone, I would like to maximize the following function fqp with linear constraits and the codes are as following: a= c(0.2,0.3,0.4) vcov=matrix(c(1,2,3,4,5,6,7,8,9),3,3) fqp <- function(b) {t(b)%*%a-0.5*((t(b)%*%vcov)%*%b)} constrOptim(c(b1,b2,b3), fqp,NULL,ui=?, ci=?, control=list(fnsc

[R] Calculate remainer

2007-12-19 Thread livia
Hello everyone, I have got a question about a simple calculation. If I would like to calculate 50/12 and return the result as 4 and the remainer 2. Is there a function of doing this? Many thanks. -- View this message in context: http://www.nabble.com/Calculate-remainer-tp14414906p14414906.html

[R] Parse Expression

2007-12-17 Thread livia
Hello everyone, I would like to construct a datafram with the following command. eval(parse(text=paste("df=data.frame(", cmd, ")", sep=""))) But it comes out " Error in parse(file, n, text, prompt, srcfile, encoding) : syntax error, unexpected $undefined, expecting ',' in "df=data.fram

[R] ls() pattern

2007-12-13 Thread livia
Hello everyone, I get some data in the following format and I would like to combine them to form a dataframe. The data is like: cbcname1 = 0.1, cbcname2= 0.2, cbcname3=0.3,... name1, name2, name2 are just some random names. I would like to achieve sth like: (cbcname1=0.1, cbcname2=0.2, cbcnam

Re: [R] Odp: If Else Function

2007-12-11 Thread livia
Hi, I guess it is because I spread the command in different rows. Thank you very much for your help. Petr Pikal wrote: > > Hi > > [EMAIL PROTECTED] napsal dne 11.12.2007 13:06:14: > >> >> Hello everyone, >> >> I would like to use the "if" statements and I was thinking sth like >> >> If ()

[R] If Else Function

2007-12-11 Thread livia
Hello everyone, I would like to use the "if" statements and I was thinking sth like If () {} else{ if() {} else{} } Is this a possible solution and is there any syntax error? Could anyone give me some advice? Many thanks. -- View this message in context: http://www.nabble.com/If-Else-Funct

[R] Linear Regression, Data is a list

2007-12-03 Thread livia
Hello, I would like to perform a linear regression and the data is a list.e.g lm(list$abc~., data=list) or lm(abc~., data=list), which would give the same result. The problem is I would like to call the response variable in a more general form. What I try to achieve is sth like lm(list$(paste("a

[R] assign vector name

2007-11-30 Thread livia
Hello, I have got a vector, for example seq(1:10), and I have an array "name" defined before which contain the vector name I would like to use. So name[1]= "price". I would like to name the vector in the following codes: paste("myname", name[1]) <- seq(1:10) But it does not work. Could anyone g

[R] No quote

2007-11-30 Thread livia
Hello, I define a dataframe named "Price" first and there are other dataframes as well. Then I built an array named "code" containing all the dataframe name. So If I call code[1], it is "Price". Basicly, I would like to call the datafram with reference to the array"code".e,g, If I want to call

[R] cbind function

2007-11-13 Thread livia
Hello everyone, I would like to use the "cbind" function to construct a dataset, combining some variable I defined before. The codes are something like var1 <- ... var2 <- ... var2 <- ... ... data <- cbind(var1,var2,var3...) The problem is I would like some flexibity in the data, i.e. the numbe

[R] RE xcel Macro Mode

2007-11-09 Thread livia
Hi everyone, I would like to write VBA macros for accessing R and it is my first attempt. I really could use some help here. I am trying to use the following code to read data from Access. The R code between "" is correct as I successfully run it from R, but when I call it using VBA, it comes out

[R] Linear Regression

2007-11-07 Thread livia
Hello everyone, I would like to a linear regression with the following code. lm(a[,"fquamsci"]~., data=a) a is a list with class "mts" "ts" , and "fquamsci" is the name of the response variable in a. I would like to do a linear regression of "fquamsci" to the rest of the variables. But it tur

[R] cbind()

2007-10-31 Thread livia
Hello, I would like to use the cbind() function to construct a matrix used in the middle of a function as following for (i in 1:1000) { b[i] <- function(cbind(a[[1]][[i]], a[[2]][[i]],a[[3]][[i]],...a[[67]][[i]])) } Is there an easy way of achieving this rather than "cbind" every column? --

[R] Loop

2007-10-29 Thread livia
Hello, I would like to build a list through the following codes."know1" & "know2" are some list obtained before. "know1" has the length of 50 (as for i), "know2" has the lengh of 50 (as for i), know1[[i]] has the length of 1000, know2[[i]] has the length of 1132. I would like to get the list "fina

Re: [R] Linear Regression

2007-10-05 Thread livia
Thank you very much for your reply and I did not make myself clear. My model is like lm(y ~ x1+x2+x3,data), I would like to see E(y) and the standard error. Ben Bolker wrote: > > > > livia wrote: >> >> Hello, >> >> I am performing a multiple linear r

[R] Linear Regression

2007-10-05 Thread livia
Hello, I am performing a multiple linear regression, is there a way of get the mean and standard error of the response variable? Could anyone give me some advice? Many thanks. -- View this message in context: http://www.nabble.com/Linear-Regression-tf4574635.html#a13057768 Sent from the R help

[R] Linear Regression

2007-10-02 Thread livia
Hello, I would like to fit a linear regression and when I use summary(), I got the following result: Call: lm(formula = weight ~ group - 1) Residuals: Min 1Q Median 3Q Max -1.0710 -0.4938 0.0685 0.2462 1.3690 Coefficients: Estimate Std. Error t value Pr(>|t|)

[R] fPortfolio Package

2007-09-24 Thread livia
Hello, I am very interested in Portfolio Optimization functions in this package. For the "cmlPortfolio", I thought it would be a set of the portfolio along the "Capital Market Line", but it turns out that there is only one portfolio. I was wondering which portfolio should this be? Besides, is th

[R] fPortfolio Package

2007-09-21 Thread livia
Hello, I would like to do a portfolio optimization in R and I tried to use the function in "fPortfolio", but it appears there does not exist such function. Could anyone give me some advice? Many thanks -- View this message in context: http://www.nabble.com/fPortfolio-Package-tf4492927.html#a1

[R] Portfolio Optimization

2007-09-20 Thread livia
Hello, I would like to solve a portfolio optimization problem in R. As far as I searched, I found the example of "solve.QP" &"portfolio.optim". In my understanding, both of them are based on given expected return, finding the minimum variance. Is there a way of doing this in an opposite way?i.e m

[R] vector name

2007-09-17 Thread livia
I have got a list named "filtered", I would like to construct alist named "fdata" as following: fdata <- cbind(matrix(unlist(filtered),ncol=28), myregime) If I try names(filtered), it gives all the correct name for each vector, but if I try names(fdata), it appears "filtered[[1]]"

[R] Tick intervals

2007-09-12 Thread livia
Hi, I would like to plot a histogram with the following codes, and I would like to make the tick intervals smaller. I tried to add "lab=c(1,1,12)", but nothing changes. par(mfrow=c(1,1),font=1, cex=0.8) hist (data1, seq(-0.01,0.3,0.01),freq = FALSE, main="Figure1.",xlab="return",lab=c(1,1,12)) l