Fairly new to R (used for much simpler stuff), coming from a deeper SAS background
I have a Dataframe which contains multiple types of data, amongst which 5 ratios, used as factors in logistic regression.
The factors are then transformed using a logistic transformation, subject to parameters that are given.
I need to apply those parameters to a longer dataset to essentially apply that logistic model to my own dataset (This is for validation purposes, so the parameters have to be exactly applied).
The dataframe would look something like:
obs unique_identifier event Regressor_1 Regressor_2 ... Regressor_5 Obs_date
no no factor no no no date
The dataset also has other columns, but lets keep it short.
Parameters are contained in a separate dataframe that looks like
Regressor Slope Sign Mid-point mean deviation
Regressor1 .. .. .... ... ....
Regressor2
and so forth. What I need is to perform an operation so that I get:
Regressor1_Score = F(Regressor1, parameters in matrix)
What is the best way to get that in R? something like mapply
? how can you specify that parameters (rows in 2nd df) have to be applied to relevant columns in first df?