Skip to main content

# Tag Info

## Hot answers tagged regression

7 votes

### How to conduct logistic regression between two rasters

To eleborate on Spacedman's answer (and to make it more clear where the problem may reside: Can you combine the data? s <- stack(sinks, tpi) If so, you should be able to do: v <- data.frame(...
• 10.8k
7 votes
Accepted

### Linear regresion at each raster pixel's value to predict future value (in R language)

Starting with your raster stack s: > s class : RasterStack dimensions : 15, 10, 150, 6 (nrow, ncol, ncell, nlayers) I'll show how to fit and predict in various ways. I'm going to try to ...
• 64.7k
6 votes

### Difficulties applying zyp.sen() to a RasterBrick object in R

The problem is not entirely yours. zyp.sen is not well written: it fails unless you guess correctly concerning the syntax it is hoping for. (Whether that is its only problem is a question I have not ...
• 69.9k
6 votes

### Calculating R-Squared Using the 'Residuals' Band from Google Earth Engine's linearRegression() Reducer

Thought I would add the answer to my question here for the next person who has this problem. GEE developer Nick Clinton presented his solution to it in the Google Earth Developer Forum (https://groups....
5 votes

### Access to attribute in rasterlayer in R

You can access this table via levels: > levels(r) [[1]] ID OID Value Count LC_Code Land_Cover Area_Ha 1 0 0 0 25615512 255 No Data 2305400.00 2 1 1 ...
• 64.7k
5 votes

### Understanding regression function output in ArcGIS Kriging?

You are correct about value you referred to, the residuals: An excerpt from Esri's Regression analysis basics Residuals: These are the unexplained portion of the dependent variable, represented in ...
• 12.1k
4 votes
Accepted

### Getting Negative values in Regression based Biomass model!

The crux is most likely in the fact that you are using a MLR, as this method can indeed result in values below 0, while a negative biomass obviously does not exist in real life. As for the ...
• 1,166
4 votes

### How to conduct logistic regression between two rasters

If your rasters have the same grid size and position, and the sinks raster is 0s and 1s (or TRUEs and FALSEs) then its just like doing a logistic regression any other way in R, but getting the values ...
• 64.7k
4 votes
Accepted

### Linear regression between every 3×3 pixels between two rasters using R

I assume that by "lapse rate" you mean the regression slope. You are essentially describing a focal regression and since there is no multivariate version of raster::focal, there is no canned way to do ...
• 31.9k
3 votes
Accepted

### How do you find the appropriate spatial weight to use for a spatial analysis?

I am going to tackle this because it is likely going to be closed as "too broad" and I doubt that you will get a satisfactory answer if migrated to something like Cross Validated. Although, there is ...
• 31.9k
3 votes
Accepted

### Performing per-pixel linear regression over multiple rasters with NoData?

Using technique described here I populated the table of integer grid by values from 3 rasters of interest. I used IS NULL query to populate records with no match (NO DATA) by -999 during data ...
• 23.1k
3 votes

### QGIS Regression Tools using only feature data

have you tried this one? Multiple Linear Regression(Shapes). http://www.saga-gis.org/saga_tool_doc/7.8.0/statistics_regression_12.html Interestingly the documentation refers to something called Trend ...
• 3,566
3 votes
Accepted

### Surf3D, example from ggRandomForests: Random Forests for Regression

You need to create a bivariate partial dependency plot first. I believe the function you are after to create the object to pass to plot3D::surf3D is ggRandomForests::partial.rfsrc, ggRandomForests::...
• 31.9k
2 votes

### Ignoring multi-collinearity in spatial stepwise regression modeling?

I think you must review a multicollinearity before you uses model regression. It is part of assumptions of multiple Linear Regression. And if you dont accomplish with all parameter, you have a bad ...
• 117
2 votes

### Google Earth Engine: Evapotranspiration Linear Regression MODIS

The main issue is that you should not use arrays when you don't need to. If I'm interpreting your intention correctly, here it is the better way: var start = '2000-01-01'; var end = '2014-12-31'; ...
• 4,359
2 votes

### Linear Regression using Google Earth Engine

you can use ee.Reducer.linearRegression(numX, numY) API,the details search in GEE document.
2 votes
Accepted

### Apply mann-kendall analysis on stacked raster in R as a function

Always check that your function for calc works before using it: > tsfun(runif(3)) Error in names(r) = c("Z", "Sen", "Old_Sen", "p", "s", "var(s)", "Tau") : 'names' attribute [7] must be the ...
• 64.7k
2 votes

### Calculating Bare Soil Line using R?

Here's your model: NIR = αRed + β where NIR and Red correspond to the near-infrared and red bands of the satellite sensor, alpha is the slope, and beta the y intercept. An ordinary least ...
• 64.7k
2 votes

### Display R2 in GEE chart

The R2 value is not shown on the chart by default (I don't know if there is a way to change this behaviour). It is displayed if you hover the mouse over the legend field for the line, on the displayed ...
• 321
2 votes

### modifiedmk Mann-Kendall Test Over NC /Raster stack

First, you are using a double bracket where you do not need to and second, it is often better to use a numeric index. library(modifiedmk) x <- c(Nile) Here, if you use a single bracket it ...
• 31.9k
2 votes

### When to use spatial regression for the proximity analysis

Sounds like an interesting piece of work. A simple statistical solution may be to map linear regression residuals of each house, based on distance vs property value change. (There are a million other ...
• 3,566
2 votes

### Interpreting results of GWR - what do the values mean?

I had the same doubt myself, and contrary to what some other people suggested you to do in the answers above, from the source code it is not straightforward what all those concepts mean. However, ...
2 votes

### Regression in QGIS

In the processing toolbox (Processing > Toolbox) you can find a pile of suitable tools (search for "regression" and "sample"). You could first create a raster from the ...
• 14.6k
2 votes

### How to calculate the distance of multiple points to a line in QGIS

Your measurements are a point layer, if I understood correctly. Create a new attribute on this layer with Field Calculator with this expression and replace line_layer with the name of the line layer. ...
• 72.4k
1 vote
Accepted

### Calculate band using data from existing bands and look-up table in Google Earth Engine

[Crossposted from GEE listserv] I'm hoping this gets you most of the way. It's a simplified example, but you should be able to adapt it to your needs. https://code.earthengine.google.com/...
• 266
1 vote

### Running convert Raster to Point Features in arcpy returns an error

I got it to work with the NumpyArray method. This is the Code: import arcpy import numpy arcpy.env.workspace = "C:/Users/..." rasListe = arcpy.ListRasters() for ras in rasListe: arrays = arcpy....
1 vote
Accepted

### Different trend test result with modifiedmk and zyp package in R

Always check your function on some sample values first: > final_stacked[1,1,] layer.1 layer.2 layer.3 layer.4 [1,] 796 1592 2388 3184 > zyp.trend.vector(final_stacked[1,1,]) ...
• 64.7k
1 vote

### How to conduct logistic regression between two rasters

To supplement the answers you already got, I believe that one viable strategy would entail: drawing a number of random sampling points within your study area; drawing them with a subjective minimum ...
• 1,536
1 vote

### Using R to do logistic geographically weighted regression(GWR) prediction

Is the gwmodel\$SDF object not populated? The model object should contain a SpatialPixelsDataFrame object with the model estimates. It is very difficult to provide advice when you do not show us what ...
• 31.9k
1 vote

### Predicting Enhanced Vegetation Index using Random Forest in R

If you can't handle spatial data, transform it into a data.frame. In a really coarse example (model's performance will be very bad, rasters are totally random): library(raster) library(randomForest) ...
• 13.7k

Only top scored, non community-wiki answers of a minimum length are eligible