How to fit data into nonlinear model

3 views (last 30 days)
chitra
chitra on 30 Mar 2013
I am practically new in statistical modelling so kindly bear with my questions.I have a data set of 3 dimensions that is there are three columns and 50 rows (50 observations). The data set is nonlinear and so I need to fit this data into a model.How do I go about?I have gone through the System Identification toolbox but failed to understand how to work with multiple column of data that is how to fit a 50x3 matrix using nonlinear regression models.As far as I can understand,AR model may not work since the general form of AR model has only one variable.Since,my data set has 3 columns I will need atleast three variables.The nonlinear model command nlarx() did not give me any model coefficients.So,I was unable to formulate any model.Also,I am confused as to if I should give any exogenoeus inputs or not.Can somebody please tell me how to go about this with an example code?Thank you.

Answers (1)

Rajiv Singh
Rajiv Singh on 10 May 2013
Is there an input/output relationship among the 2 variables? That is, does changing one affects the other in a cause-effect manner? If so, you need to separate out the variables into input data and output data. If not, you can treat the data set as 3D time series. In either case, start by packaging the data as an IDDATA object. In the following I assume you have the time series case:
z = iddata(data, [], 1); % data has 3 columns and 50 rows
% compute linear ARX model of some order NA
NA = [3 0 0; 0 4 0; 0 0 5];
m1 = arx(z, NA);
% compute a nonlinear model that uses tree partition nonlinearity and same orders
m2 = nlarx(z, NA, 'treepartition');
% compute a nonlinear model that employs sigmoid network with 5 units for all three time series:
m3 = nlarx(z, NA, sigmoidnet('num', 3))
Using diagonal NA means the three variables are treated as independent (not influencing each other). Introduce nonzero values for the nondiagonal entries of NA to realize a coupled model. NA values would be determined using prior information (knowledge of what the timeseries represent and how they might be influencing each other) or numerical order search (try various combinations and see which one(s) give good fit to an independent validation dataset).

Categories

Find more on Linear Model Identification in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!