have a look at our package distr:

library(distr)
x1 <- Norm(mean = 0, sd = 1)
x2 <- Binom(size = 1, prob = 0.75)
x3 <- x1 + x2
plot(x3)
# to get density, cdf, quantile, and random numbers use
d(x3)(5)
p(x3)(0)
q(x3)(0.975)
r(x3)(20)

# you can also have additonal coefficients; eg.
x4 <- 3*x1 + 2*x2
plot(x4)

For more details on the computations see http://arxiv.org/abs/1006.0764

hth,
Matthias

On 22.04.2014 13:11, Ms khulood aljehani wrote:

Hello
i have two independent variablesx1 from normal (0,1)x2 from bernoulli (o.75)
i need the density estimation of(b1*x1) + (b2*x2)
where b1 and b2 are two fixed coefficients
thank you                                       
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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, reproducible code.


--
Prof. Dr. Matthias Kohl
www.stamats.de

______________________________________________
R-help@r-project.org mailing list
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, reproducible code.

Reply via email to