Skip to content

tsmcplm error: "non-numeric argument to mathematical function" #1

@heinonmatti

Description

@heinonmatti

Hi,

I'm getting an error for a specific vector, even though the same script works for dozens of other variables.

Can you reproduce?

data_vector <- c(0.150357, 0.091533, 0.09984, 0.101283, 0.123705, 0.122077, 0.095315, 0.096931, 0.113113, 0.067488, 0.170659, 0.1792, 0.073393, 0.073052, 0.082565, 0.067322, 0.089301, 0.109716, 0.107416, 0.144447, 0.08839, 0.12644, 0.074899, 0.146276, 0.128602, 0.100759, 0.06336, 0.137804, 0.163452, 0.194929, 0.091001, 0.065021, 0.150731, 0.096441, 0.094375, 0.137209, 0.085126, 0.041717, 0.111835, 0.114685, 0.104568, 0.082643, 0.130608, 0.12735, 0.13431, 0.148144, 0.116405, 0.168537, 0.10563, 0.139675, 0.127592, 0.159799, 0.138336, 0.149442, 0.209077, 0.162001, 0.143234, 0.165894, 0.18428, 0.145829, 0.118546, 0.147755, 0.101101, 0.194417, 0.189606, 0.14088, 0.155758, 0.13527, 0.14008, 0.169117, 0.083046, 0.160372, 0.146931, 0.138529, 0.148256, 0.092894, 0.124322, 0.115672, 0.188048, 0.114584, 0.123101, 0.163363, 0.137724, 0.145214, 0.16345, 0.238108, 0.116967, 0.124973, 0.119525, 0.077846, 0.135734, 0.120872, 0.147821, 0.13274, 0.147442, 0.138495, 0.098779, 0.091144, 0.094422, 0.127692, 0.124156, 0.10851, 0.074721, 0.129563, 0.117388, 0.085393, 0.131234, 0.186982, 0.075616, 0.116339, 0.158742, 0.08217, 0.081777, 0.149564, 0.174108, 0.091942, 0.17058, 0.166335, 0.156998, 0.094677, 0.087105, 0.112244, 0.169368, 0.083659, 0.102763, 0.099591, 0.108297, 0.086138, 0.066612, 0.106379, 0.158049, 0.125595, 0.135791, 0.144142, 0.102989, 0.14446, 0.128644, 0.106944, 0.133522, 0.117802, 0.095384, 0.096701, 0.152929, 0.118977, 0.195594, 0.142342, 0.132076, 0.09769, 0.116301, 0.102911, 0.130461, 0.13648, 0.09864, 0.089654, 0.114244, 0.093315, 0.149619, 0.12263, 0.081444, 0.111145, 0.095987, 0.080995, 0.13133, 0.125788, 0.150343, 0.080602, 0.106201, 0.09449, 0.182279, 0.192223, 0.077968, 0.129319, 0.120471, 0.165532, 0.08756, 0.16095, 0.088861, 0.152738, 0.116246, 0.105241, 0.079401, 0.200128, 0.072724, 0.113462, 0.087973, 0.064937, 0.12905, 0.117608, 0.153126, 0.172643)


TSMCP::tsmcplm(
      Y = data_vector,
      X = NULL,
      method = "adapt",
      c = 1
    )

Error in abs(diff(adcpcss.cp)) :
non-numeric argument to mathematical function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions