Please see the posting guide: posting 3 times only reduces your chance
of an informative answer (as does posting in HTML). Your posting is too
vague for others to know what it is you do not understand.
R is Open Source: please read the sources for the definitive answer to
the 'know the comput
Hi, all
I am trying to figure out the computation result for
predict.lm(...,type="terms") when the original fitting model has a
nesting term, lm(y ~ group/x ).
A example,
> set.seed(731)
> group <- factor(rep(1:2, 200))
> x <- rnorm(400)
>
> fun1 <- function(x) -3*x+8
> fun2 <- function(x) 15*x
Does this help you?
http://stackoverflow.com/questions/3971844/access-variable-value-where-the-name-of-variable-is-stored-in-a-string-in-r
On 14-01-18 04:21 PM, ce wrote:
I want access and object , its name is in an variable :
require(xts)
data(sample_matrix)
head(sample_matrix)
Hi, all
I am trying to figure out the computation result for
predict.lm(...,type="terms") when the original fitting model has a
nesting term, lm(y ~ group/x ).
A example,
> set.seed(731)
> group <- factor(rep(1:2, 200))
> x <- rnorm(400)
>
> fun1 <- function(x) -3*x+8
> fun2 <- function(x) 15*x
Hi, all
I am trying to figure out the computation result for
predict.lm(...,type="terms") when the original fitting model has a
nesting term, lm(y ~ group/x ).
A example,
> set.seed(731)
> group <- factor(rep(1:2, 200))
> x <- rnorm(400)
>
> fun1 <- function(x) -3*x+8
> fun2 <- function(x) 15*x
Does this help you?
http://stackoverflow.com/questions/3971844/access-variable-value-where-the-name-of-variable-is-stored-in-a-string-in-r
On Sat, 18 Jan 2014, ce wrote:
I want access and object , its name is in an variable :
require(xts)
data(sample_matrix)
head(sample_matrix)
Can you pliz  send me the R code for estimating parameters of a 2 phase
distribution given some data to fit. Im nelson sibanda , a final year student
at Nust
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://sta
-- Forwarded message --
From: Norman McBride
Date: Fri, Jan 17, 2014 at 9:54 AM
Subject: Implementing a Formula into a Column of a Data Frame
To: r-help@r-project.org
Now, if I were to move the data over from an excel doc would that change
anything. I do understand that that I wo
Thank you, Frede. I will look into these suggestions. I did not specify the
data type carefully…I will assess this and see if it cleans up the problem.
best wishes,
Chris
On Jan 18, 2014, at 2:23 AM, Frede Aakmann Tøgersen
wrote:
> I think you are trying to access memory that you are not al
Hello guys,
I'm using the barp function from the plotrix package, which works really
really great.
Unfortunately, I need a finer spacing of the labels on the y - axis.
Is there any way to control this?
Looking at the documentation of barp, it seems to be done rather
automatically.
An option w
May be this helps:
assign("a",eval(parse(text=b)))
A.K.
On Saturday, January 18, 2014 4:24 PM, ce wrote:
I want access and object , its name is in an variable :
require(xts)
data(sample_matrix)
head(sample_matrix)
Open High Low Close
2007-01-02 50.03978 50.11778
Yes, it works perfect, thanks a lot.
-Original Message-
From: "Marius 't Hart" [mar...@ai178182.ai.rug.nl]
Date: 01/18/2014 04:58 PM
To: "ce"
CC: ""
Subject: Re: [R] accessing an object with a variable ?
Does this help you?
http://stackoverflow.com/questions/3971844/access-variable-
On 19/01/14 06:20, peter dalgaard wrote:
Offhand, I'd say that the issue isn't so much the starting values as the risk of
hitting the upper bound on gamma. If you get gamma set to min(x) at any point during
the iteration, the density at the corresponding point is zero, the log-likelihood is
-I
I want access and object , its name is in an variable :
require(xts)
data(sample_matrix)
head(sample_matrix)
Open High LowClose
2007-01-02 50.03978 50.11778 49.95041 50.11778
2007-01-03 50.23050 50.42188 50.23050 50.39767
2007-01-04 50.42096 50.42096 50.26414 50.33236
People who subscribe to an avoid-for-loops "mantra" are often missing the
point. Converting for loops to indexing can often yield speed improvements.
Converting for loops to apply functions does not improve speed. (If you think
it does, you are probably handling memory allocation differently.) W
Offhand, I'd say that the issue isn't so much the starting values as the risk
of hitting the upper bound on gamma. If you get gamma set to min(x) at any
point during the iteration, the density at the corresponding point is zero, the
log-likelihood is -Inf, and , the magic smoke escapes.
Perhap
> These examples do not apply to the objects generated by the ecdf function.
Look at the objects generated by the ecdf function and you will see
that they are functions, not vectors of numbers (the 'f' in ecdf stands
for 'function'). You need to apply the functions to vectors of numbers
to get wh
This is particularly complicated and a bit of an edge case, so I
wouldn't try too hard to understand what's going on, but I'll try to
explain anyway.
Your code creates two calls to the subset-replacement function
(xts:::`[<-.xts`). The first call replaces the value of "Close" in a
temporary copy
Hi Rolf,
I fit 3 parameters lognormal in this way
myf<-function(x,m,s,t)(1/((x-t)*s*(2*pi)^0.5))*exp(((-(log(x-t)-m)^2)/(2*s^2)))
then fitdistr(y, myf, list(m=1,s=1, t=2))
I choose initial parameters value seeing data, I noted that a goog estimate of
t would be 2...Me too I've some errors, hav
I doubt it.
1. The OP failed to specify how "populatedness" is defined. Is it
NULL, NA, "", " ",...?
2. What is percent() ? Is this the OP's function or one from a package
or pseudocode or ... ?
3. lapply(df,function)
is generally preferable in R to:
for(name in colnames(df)) function(df[ ,name
Hi Rainer,
Thanks for the tip.
Your suggestion works perfectly, however as per the R Mantra of avoiding
for loops, I propose the following this alternate:
# number of strings to be created
n <- 50
# random length of each string
v.length = sample( c( 2:4), n, rep = TRUE )
# letter sources
src.
My aim is to estimate a multinomial model with some endogenous variables.
I tried the control function approach but the results are rather bad.
I am thinking to ML estimation. Is there a package I can use to estimate
this model?
Thanks a lot
Erasmo Papagni
Department of economics
Universit
I forgot to mention for multiple plots
? print.trellis
Duncan
-Original Message-
From: Gerrit Draisma [mailto:gdrai...@xs4all.nl]
Sent: Saturday, 18 January 2014 21:49
To: arun; Duncan Mackay
Subject: Re: [R] eliminating white space in lattice plot
Ha Arun and Duncan,
Thanks for your a
Hi
Try
for (cname in colnames(mydf))
print((percent(length(is.null(mydf [, cname]) / lines))
Br. Frede
Oprindelig meddelelse
Fra: Jeff Johnson
Dato:18/01/2014 02.10 (GMT+01:00)
Til: R help
Emne: [R] For loop on column names
I'm trying to find a more efficient to calculate t
I think you are trying to access memory that you are not allowed to.
Or did you specify the type of all of your data to be of the right ones?
The segfault message at least say so.
> *** caught segfault ***
> address 0x2464943a08, cause 'memory not mapped'
>
> Traceback:
> 1: .Call("gyroscope"
On 18/01/2014 09:06, Frede Aakmann Tøgersen wrote:
It has to do with setting a to large upper bound for the gamma
parameter. However, we are estimating the value of gamma because we
do not know it so how can we set an upper bound for gamma??
You have starting values, so have some idea of the ML
It has to do with setting a to large upper bound for the gamma parameter.
However, we are estimating the value of gamma because we do not know it so how
can we set an upper bound for gamma??
Perhaps other optimization algorithms in optim() can be used (Nelder-Mead works
for this x at least).
H
27 matches
Mail list logo