Can you help me with a logistic regression?

조회 수: 1 (최근 30일)
Mario Trevino
Mario Trevino 2013년 5월 9일
I need to solve the following system:
log(pR,i/pL,i)=SIGMA{ alpha_j [(rR,i-j)-(rL,i-j)]}+SIGMA{ beta_j [(cR,i-j)-(cL,i-j)]}+gamma
rR, rL, cR, cL: are known binary vectors (0,1) that describe the state of a system at different discrete times i=1,2,3,.... 'r' stands for reward, 'c' for choice, 'R' for right and 'L' for left (i.e. this is derived from a choice task with 2 options, L or R).
Note how the components for each summation are weighting the relative influence of past events as j increases.
PROBLEM 1: Im still uncertain on how to estimate the log odds (left portion of the equation). pR,i is the probability that cR,i==1.... and pL,i=1-pR,i. Likewise cL,i=1-cR,i.
PROBLEM 2: get alpha_j (function of j), beta_j (function of j), and gamma.

답변 (1개)

Tom Lane
Tom Lane 2013년 5월 10일
I don't understand your notation, in particular log(pR,i/pL,i). I guess you tried to explain that in PROBLEM 1, but I still don't understand what you intend to use as the response (or output or y) in this problem.
The Statistics Toolbox has a glmfit function (also GeneralizedLinearModel.fit) for fitting binary logistic regression. That can cope with estimating odds even when the inputs are all 0 or 1. But I suspect from the fact that I don't follow your notation that this will not be adequate.
Can you explain any further, or point to a reference?

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by