[R] Request for some help about uncertainty analysis using bootstrap approach

Bhaskar Mitra bh@@k@r@ko|k@t@ @end|ng |rom gm@||@com
Sun May 29 23:23:27 CEST 2022


Hello Everyone,

I have a query about uncertainty analysis and would really appreciate some
help  in this regard.

I intend to gapfill the NAs in the “X” column of the dataframe (Df1). I
have grouped the data using the column “Group” ,
determined the mean and generated the “Z” column.

While I am using the mean and standard error approach to generate the
uncertainty analysis, can we use the bootstrap approach to
generate the uncertainty for the “Z” column? Any help in this regard will
be really appreciated.

Regards,
Bhaskar
---------------------------------------------------------------

Df1 <-

Group     X            Y    Z
1           2              3     2
1          NA            3     3
1            3             3     3
1           4              3    4
2            2             2    1
2          NA            2    3
2           NA           2    3
2            4             2    4
3             2            2    2
3         NA             2     2
3              2           2     2

-------------------------------------------------------------------------------
Codes:

Df1 <- Df1 %>% group_by(Group) %>% summarise(Y= mean(X), na.rm=T)

Df1  <- Df1%>% mutate(Z= coalesce(X,Y))

	[[alternative HTML version deleted]]



More information about the R-help mailing list