BookmarkSubscribeRSS Feed
Yiping
Fluorite | Level 6

Hi Guys,

 

I'm developing a model in SAS ESP, and I need to add a simulated variable into a stream. Which window should I use, Compute or Calculate?

 

I have read that both windows are able to create new calculated variable. Does any one knows the differences between the two windows? And which one is better suited in my case?

 

By saying simulated variable, I mean this variable doesn't exist in the streaming data and I want to create it by using functions like Rand("normal", mean, sd).

 

I'm new to SAS ESP and so any suggestions/comments would be appreciated. Thank you very much in advance!

4 REPLIES 4
ChrisNZ
Tourmaline | Level 20

Did you find the answer?

@ChrisHemedinger Is there a more appropriate forum for SAS ESP?

Yiping
Fluorite | Level 6

Hi Chris,

 

Thank you for your reply!

 

I couldn't simulate the data using the windows provided in ESP Studio, so I did it alternatively by simulating the data in R and then imported the simulated data as another data source. I joined the simulated data with the original data stream after that.

 

Thanks!

Yiping

 

evan_guarnaccia
SAS Employee

Hi Yiping,

 

     You could use either window. It depends on what you're doing. I think in your case, you want to use the Compute window. You can use the Expression Language functions to create new fields. The Calculate window is for using algorithms provided, like STFT for example, or deploying a MAS module.

     If you like, we can look together at what you're trying to do, and I can help make sure you get it done.

 

Thanks,
Evan

Yiping
Fluorite | Level 6

Hi Evan,

 

Thank you for sharing the differences between Compute window and Calculate window!

 

I did try to use "rand" function in Compute window but it only allows me to generate random numbers within a given range. However, what I want to achieve is to simulate the data follow some statistical distribution like Normal Distribution.

 

I did it in another way by simulating the data in R, and imported the data as another data source. I then joined them with the original data stream.

 

Thanks!

Yiping

Whether you're already using SAS Event Stream Processing or thinking about it, this is where you can connect with your peers, ask questions and find resources.

 

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1054 views
  • 0 likes
  • 3 in conversation