# Tag Info

0

First, remember that a Cox model with a time-dependent covariate assumes that the instantaneous value of the covariate at any time determines the hazard at that time. Use your knowledge of the subject matter to consider whether that really is an appropriate way to model the relationship between CEA levels and outcome. With this longitudinal study some ...

4

Two points: Your data are log-log scaled. So why don't you take the logs of them? Since you expect a sigmoid function behind the data, why not trying fitting it to the data? Below, I model your log-transformed data as a (scaled) difference of two softplus functions, $y = log(1+e^x)$, plus a constant term: $$y = log(1 + e^{\alpha_1 + \beta x}) - log(1 + e^... 0 One possibility is to separate your data into 2 variables. One with an indicator of the value is zero or non zero. And the other being value of the variable given a non zero variable. And then apply the transformation. On a separate note you can try using power transform/box Cox transform. 2 If the response is count valued, you should consider using an appropriate modeling strategy that implicitly log-transforms the intensity rather than the count values themselves. Consider that a Poisson process with low intensity is likely to have right skewed results and many 0s, but log-transforms of the data would lead to highly biased estimates of the ... 3 I have nothing to add to whuber's brilliant answer using the Box-Cox transformation. I just wanted to offer an alternative source of the approximation, using the Maclaurin series for the natural logarithm:$$\ln (y+1) = y - \frac{y^2}{2} + \frac{y^3}{3} - \cdots. Ignoring the higher-order terms in the expansion gives the crude first-order approximation: ...

0

The problem you are going through is the same one I had when reading about this topic in most introductory books. Most books indicate that WLS will address heteroskedasticity by "eliminating" it from the model. This is technically done by using weights equal to 1 over the source of the heteroskedasticity. The alternative is to transform all data accordingly. ...

2

You can just run as.data.frame() on the sempreds object to turn it into a data.frame. Note that this isn't actually prediction; you're estimating factor scores. This covered in any SEM textbook (e.g., Bollen 1989). Factor scores are imperfect estimates of the latent variable that can often be used in subsequent analyses or for descriptive purposes. That ...

0

You should be able to calculate the mean absolute error (MAE) using just very basic functions in Python. If y is your target variable and you used your transformed target variable y_trans to train the model, you will get a transformed outcome variable out_trans. To get a meaningful MAE, in housing price e.g., you would have to transform your outcome variable,...

0

You have to say it was "mean-zero standardized." Dividing by the original calculated standard deviation, $\sigma$, results in a standardized variate with a standard deviation of 1. It has mean zero since it was "centered" (the average was subtracted as well). It's also not normalizing since normalizing implies the final range of the feature (variable) is [...

1

As ars' answer states, standardization is the transformation that involves: mean-centering, and rescaling to unit variance. A generalization of standardization is whitening or sphering whereby a set of one or more variables is linearly-transformed (typically after mean-centering) so that the covariance matrix is the identity matrix. A great reference is: ...

Top 50 recent answers are included