Entering edit mode

14 months ago

anshulmbi
▴
30

Hello Everyone, Below is the table each id column contains 7 visits and their value is in AC107c column. I want to use lowess function in R to get a smooth fitted value (one out of 7) for each ID. Please help me how I can do it in R. Thanks!!

```
VisitID ID AC107c
V5 A 70
V6 A 67
V1 A 75
V8 A 62
V4 A 78
V7 A 74
V3 A 80
V6 B 101
V3 B 109
V4 B 100
V7 B 103
V1 B 94
V8 B 100
V5 B 103
V1 C 81
V8 C 86
V5 C 84
V6 C 83
V4 C 88
V3 C 86
V7 C 85
```

Thank you so much for your kind help. But my actual problem is I want to predict one value for each id from 7 visits with the help of the LOWESS function. Also if possible, please let me know how to incorporate the loop because I have more than 500 ids data. Thank you!!

Take a look at the

`predict()`

function - you will also require the`loessfit`

objectFor the loop, I may ask that you have a think about that in your own time.

Thank you so much for your kind suggestions.