J.Zhang J.Zhang - 15 days ago 4
R Question

How can I read the specified column in the generated data frame in R?

Here is my code:

# load fitdistrplus package for using fitdist function
# fit logistic distribution using MLE method
x.logis <- fitdist(y, "logis", method="mle")
b1 <- bootdist(x.logis, bootmethod="param", niter=20)
b1# Here are 20 b1.

How can i read the parameter values (location) in b1 ? Thank you very much !


Use the str function to inspect the structure of the data. In fact, b1 is a list, and the first object of this list contain a regular data frame.

# extract the data frame for the first object of the list
data <- b1$estim
# Also you can use the double bracket operator
b1[[1]][, "location"]

In the last part of the code you can notice that the double square brackets are used for subset the object of the list, and the normal square brackets are for subset the elements of the object.