about common mistakes {psyosphere} | R Documentation |
Tips to prevent common mistakes
Mostly the coordinates don't have an even time interval. This can be because of the missing data, planned data gaps or deviations in the GPS tracker. To prevent this, you can calculate the time difference between coordinates with difftime
and used it as weight for weighted descriptive statistics.
After removing gaps, you should be careful to recalculate speed, time difference, etc. since this function can't see that the gaps are removed. To work around this, you can just omit gaps with the descriptive functions that begin with "des_". They can ignore gaps.
If you use Psyosphere for commercial use or research, please support us by include one off the following references:
Creative Commons: "Psyosphere" by B. Ziepert, E. G. Ufkes & P. W. de Vries from analyse-gps.com / CC-BY-SA-4.0
APA: de Vries, P. W., et al. (2016). "De psychologie van bewegingen GPS-technologie voor de analyse van natuurlijk gedrag." Tijdschrift voor Human Factors 2: 11-15.
Benjamin Ziepert. Please send feedback to: feedback-psyosphere@analyse-gps.com.
about_analysing_tips
, about_demos
, difftime
, wt.mean
# Example forgetting to use weighted statistics -------------------------------- data(psyo) tracks <- psyosphere::t_speed(psyo) tracks <- psyosphere::t_time_difference(tracks, units = "secs") # Without weighted statistics mean(tracks[,c("speed")], na.rm = TRUE) sd(tracks[,c("speed")], na.rm = TRUE) # With weighted statistics des_mean(tracks, "speed", "time_difference", t_id = "") SDMTools::wt.mean( tracks[,c("speed")], as.numeric(tracks[,c("time_difference")]) ) SDMTools::wt.sd( tracks[,c("speed")], as.numeric(tracks[,c("time_difference")]) )