我试图证明我的log_returns发行版Drop down view, image dispared on item selected已正确安装了Pareto-Levy Stable Distribution。我开始使用class SpinnerAllowanceAdapter extends ArrayAdapter<String> {
SpinnerAllowanceAdapter(@NonNull Context context, int resource, int textViewResourceId, @NonNull String[] objects) {
super(context, resource, textViewResourceId, objects);
}
@Override
public boolean isEnabled(int position) {
return position != 0;
}
@Override
public View getDropDownView(int position, View convertView, ViewGroup parent) {
View view = super.getDropDownView(position, convertView, parent);
TextView tv = view.findViewById(R.id.tv_allowance);
ImageView iv = view.findViewById(R.id.imageView_allowance);
if (position == 0) {
// Set the hint text color gray
tv.setTextColor(Color.GRAY);
} else {
iv.setVisibility(View.VISIBLE);
tv.setTextColor(Color.BLACK);
iv.setImageResource(getAllowanceIcon(position));
}
return view;
}
private int getAllowanceIcon(int position){
int drawableId;
//image selection
return drawableId;
}
}
使用MASS估算我的参数:
fitdistr(log_returnsSP500,"normal")
然后,我用这种方式估算稳定的分布参数:
mean sd
0.0002738807 0.0113987124
(0.0001835401) (0.0001297825)
现在,我想验证在我的直方图上叠加密度函数的接近程度。肯定会导致帕累托稳定分布比正常情况好得多,但我不知道如何证明它。有人可以帮我代码吗?感谢。