-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HiClimR other error #2
Comments
Maybe not issue, but more a data handling to fulfill HiClimR data structure, I wonder if possible to attach a sample file? |
The observations (time dimension) should not include any missing values. Since HiClimR does clustering based on correlation distance, all time steps for a specific location/point should be valid. It removes the rows (locations/points) that has any missing values and that could be all rows if one or more years are missing. You need to remove all columns with missing values manually because otherwise the dissimilarity measure (correlation distance) will represent something else. For example, if you are interested in interannual correlations, it is important to keep valid data every year instead of randomly providing information at different frequency. Solution: Make sure that you have enough rows (>2) with no missing values or handle missing values before passing the data to HiClimR. |
Hi Hamada,
I have to update my post and give you more information because the NAs was
automatically added by R where there is 0.
…On Tue, Dec 10, 2019 at 11:44 PM Hamada S. Badr ***@***.***> wrote:
Closed #2 <#2>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2?email_source=notifications&email_token=AAXY6LLTW7VQFUFC2LTQILLQYASVNA5CNFSM4JSKK3EKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVM3FFCY#event-2872464011>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXY6LPO27LIUZ554UK5BWTQYASVNANCNFSM4JSKK3EA>
.
|
Sorry Hamada, I had to update the post because the NAs were added by R where it is zero. I change it but still some problems: file look like this; The command i use end up with an error:
PROCESSING STARTED Checking Multivariate Clustering (MVC)... I extacted a region froma global date is this a problem? because I see you use continent like "Africa". How to it for a region? what you this is still creating the non conformable arrays? |
What's the size of your matrix? You set the mean threshold to 10, which masks out 5697 rows (try to use meanThresh = 0). Also, check the column names or try to use coarseR (change the steps as you wish, 1 means keeping the original data):
Finally, disable standardization and detrending: It seems to me that HiClimR can't find valid rows in the matrix you provided. |
Sorry Hamada, I had to update the post because the NAs were added by R where it is zero. I change it but still some problems: file look like this; The command i use end up with an error:
PROCESSING STARTED Checking Multivariate Clustering (MVC)... I extacted a region froma global date is this a problem? because I see you use continent like "Africa". How to it for a region? what you this is still creating the non conformable arrays? |
Using the setting you gave gone without error and produced a plot. My file have 57 years rainfall data for a window -10 to 25 lat and -30 to -25 lon
PROCESSING STARTED Checking Multivariate Clustering (MVC)... PROCESSING COMPLETED Running Time: |
You should be careful when setting thresholds for data processing. For example, meanThresh will mask out the points the receives rainfall less than the threshold value, which could be all of your data depending on the threshold value and data range/unit. Invalid data with near-zero variance (~constant year to year) will be excluded too. I'm closing this issue now. |
I am still testing HiClimR and after the matrix creation, I used xGrid2D to create lon and lat column appended to x as follow:
It looks the column names should not be there? which way to do it? because when I run an example on simple regionalization following the tutorial I got an error:
Error in x - t(fitted(lm(t(x) ~ as.integer(colnames(x))))) :
non-conformable arrays
In addition: Warning message:
In eval(predvars, data, env) : NAs introduced by coercion
The text was updated successfully, but these errors were encountered: