Comments (12)
from remoteparts.
from remoteparts.
Will you also change the p-value? I am using a threshold on p-value for data filtering and that artificial value is not needed as well.
What do you mean by automatically? Setting a zero for the coefficient and 1 for the p-value maybe with a comment in the output that values do not change should give a clear message.
Thanks a lot for the quick answer:)
Best,
Monika
from remoteparts.
from remoteparts.
As Tony mentioned, this is because it does not make sense to run a regression for a series of constants. The "true" value of the t-statistics, in this case, would be Inf
(46/0) and NaN
(0/0), according to the formula
> abs(round(AR.time$coefficients)) / round(AR.time$SE)
(Intercept) t
Inf NaN
We might consider putting a check for this sort of thing in the function, but I agree with Tony that we expect researchers to filter their own data.
The expectation is that all non-compatible data (missing values, constant over time, etc) are removed prior to analyzing.
from remoteparts.
Package version: 1.0.0
@Rapsodia86, If you are using 1.0.0, I'd recommend upgrading to the current stable version 1.0.4, which is on CRAN. We've fixed a number of bugs and improved the stability since 1.0.0.
from remoteparts.
Of course, it makes no sense to run that regression on constants. But even if I know about that case, I would rather prefer to have a trend function handling this than filtering rasters up front. Because the fitAR() does not handle NA, right?
On the other hand, I can wrap fitAR() in a small checking function when applying it on a raster stack; the question is how much longer it will run:
AR_ts_fun <- function(x) {
t<- 1:20
if (any(is.na(x))){
r_out <- c(NA,NA)}else if(
all(x == x[1]))
{r_out <- c(1,0)}else{
AR.time <- fitAR(x ~ t)
r_out <- c(AR.time$pval[2],AR.time$coefficients[2])}
return(r_out)
}
Right, an individual comment would only work if someone prints the model summary; for running in the loop without extracting the info is not useful.
@morrowcj I will upgrade the package, thanks!
@arives @morrowcj Thanks again for working on this!
from remoteparts.
Okay, thanks for the clarification.
In this specific scenario I am working on, I do not want to have any NA. It would make no sense to compare trends for pixels having different time series lengths.
from remoteparts.
from remoteparts.
It is common. Just in this instance, I do explore trends of a couple of variables constructed from the same dataset. So, I want to have consistent time-series and constant statistical power.
from remoteparts.
from remoteparts.
I'm going to reopen this, because I do think it is a good feature to consider.
from remoteparts.
Related Issues (16)
- Variance instead of SE HOT 5
- fitGLS_partition with ncores>1 HOT 12
- Package needs unit tests
- Fatal error that aborts R HOT 7
- rho in fitAR_map()
- Default output of fitCor is massive HOT 3
- fitAR_map needs parallel version HOT 4
- improve memory of parallel fitGLS_partition HOT 1
- Need geographic convex hull HOT 1
- speeding up `distm_km` HOT 4
- fitGLS_* max out CPU use on Linux HOT 3
- High core utilization during CRAN submission. HOT 12
- distm_FUN for projections like UTM. HOT 3
- Default values of fitGLS_opt() allow for negative nugget. HOT 1
- Add GLS recommendation to GLS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remoteparts.