Displaying 1 result from an estimated 1 matches for "pctchng".
Did you mean:
patching
2008 Jul 24
4
Dividing by 0
I'm trying to calculate the percent change for a time-series variable.
Basically the first several observations often look like this,
x <- c(100, 0, 0, 150, 130, 0, 0, 200, 0)
and then later in the life of the variable they're are generally no more
0's. So when I try to calculate the percent change from one observation to
the next, I end up with a lot of NA/Nan/INF, and