Climate indices

Hello, I am new to R studio. And I am working around it for my thesis which is currently a matter of urgency. Currently, I need help on how to check the best probability density function fit across multiple stations in my study region for SPI and SPEI, but I can't find a way out. Again, I only recently started working on programming software, so I only follow instructions on the how-to-do.

Following the original definitions spei uses a log-Logistic distribution by default, and spi uses a Gamma distribution. This behavior can be modified, however, through parameter distribution.

{spei} package

1 Like

Alright. There are different distributions apart from the default. I want to find the best fit for the study area. I have set my dataset in such column format.
Year, Month, St1 St2... St13. However, I haven't been able to run a distribution fit on the dataset successfully. The dataset is to be fitted to the location spi timescale, but my knowledge is limited on that. I don't want to run on default.

what does this mean ?

I run into error every time I try to work around the default gamma distribution, and test other fitting like weibull,Pearson, log logistic, genlog etc... using both the SPEI and SCI packages. "Unexpected symbol in fitSci"

can you be more specific .... what error do you run into ?

Unexpected symbol in "fitSci"

can we have some context ?
is fitSci something that you wrote in your code ? or something present in your data ?

I think this is full of good advice -
FAQ: Tips for writing R-related questions.

Basically, I am trying to do similar test using the fitsci climate indices.

It doesn't mean anything to me; I know how to program with R; can you present this as an R issue ?

additionally fitSci seems to be a relevant part of your issue; and doesnt appear in the image/text that you shared.

Alright. Thanks for your feedback. I will share the problem in the R program.

I don't know what you mean by this ? but good luck to you.

Alright. This is what i get everytime I try to fit a distribution to my dataset.

Error in fitSCI.default(Abuja, first.mon = 1, distr = "gamma", time.scale = 6, :
'list' object cannot be coerced to type 'double'

This almost always signifies a punctuation error

Perhaps your Abuja object is a list, whereas it needs to be a vector.

1 Like

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.