Hola a todos

Tengo datos por paises y en el tiempo sobre costes de exportacion.
Aparentemente hace bien el codigo la interpolacion, pero en algunos casos
me da valores negativos
coste.imputado
2630
*2199*
*1768*
*1337*
*906*
*-347*
*177*

El codigo es este
df_imputed <- datos %>%
  group_by(country) %>%
  mutate(costexportimputado =
           
approxExtrap(which(!is.na(costexport)),costexport[!is.na(costexport)],xout
= 1:n(), rule =1)$y)

Alguna idea de que puede fallar

saludos
-- 

Member, Editorial Committee, *The Economic and Labour Relations Review* (a
SAGE journal)

http://elr.sagepub.com/

Member, Editorial Committee, African Journal of Economic and Management
Studies

http://emeraldgrouppublishing.com/products/journals/editorial_team.htm?id=ajems

https://www.researchgate.net/profile/Antonio_Andres (Research Gate profile)

        [[alternative HTML version deleted]]

_______________________________________________
R-help-es mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-help-es

Responder a