[R] How to correct my error message
Sarah Goslee
@@r@h@go@|ee @end|ng |rom gm@||@com
Tue Oct 27 20:21:08 CET 2020
Hi,
a is of length 60.
b is of length 60.
z is of length 57.
What do you expect to have happen when you create y_model ? What
happens to those other 3 observations?
Sarah
On Tue, Oct 27, 2020 at 3:07 PM varin sacha via R-help
<r-help using r-project.org> wrote:
>
> Dear R-experts,
>
> Here below my R code. The warning message is not a problem to me but there is an error message more problematic. I understand the error message but I don't know if it is possible to correct the error and if yes, how to correct it.
>
> Many thanks.
>
>
> n <- 60
> b <- runif(n, 0, 5)
> a <- runif(n, 0, 5)
> z <- rnorm(n*0.95,2,3) + rnorm(n*0.05,2,9)
> y_model <- 0.1 * b - 0.5 * z - a + 10
> y_obs <- y_model +c( rnorm(n*0.95, 0, 0.1), rnorm(n*0.05, 0, 0.5) )
> df<-data.frame(b,a,z,y_obs)
>
> ______________________________________________
> R-help using 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, reproducible code.
--
Sarah Goslee (she/her)
http://www.numberwright.com
More information about the R-help
mailing list