You can use the DEoptim function in DEoptim package and to include a line of
code within your objective function that assigns a very high value when the
constraints are not satisfied. I have tried that and it works.
-
Juan David Ospina Arango
School of Statistics
Universidad Nacional de Colo
x11()
plot(density(a))
lines(density(d))
x11()
plot(density(b))
lines(density(e))
2011/10/12 pigpigmeow [via R] :
> however, if i have an excel file, but there have 6 variables, a,b,c,d,e,f.
>
>
> how to plot the probability density function of a and d in one graph, b and
> e in another graph?
>
>
x=rnorm(100,1,0.8) # A series.
y=rnorm(100,0,0.5) # Another series with different mean and variance.
plot(density(x),ylim=c(0,1))
lines(density(y),col="red")
Remember that density() is a nonparametric estimator. You should properly
choose the bandwith.
--
View this message in context:
http://r.
Hello.
Not at all in the way you have shown. Just to improve your code
"readability", try to avoid naming your variables beginning with period
(example: .hello).
In contrast with Matlab (for example) the period in R is not to have access
to an object property.
--
View this message in context:
h
4 matches
Mail list logo